I am making some simple games using this environment and I need to rotate some bitmaps, but the TBitmap class/objects does not have these functions shown here http://edn.embarcadero.com/article/42237 . I am using C++ Builder XE5 and making VCL Forms Application C++. I know I am not making FireMonkey application, but how is it then possible to rotate image without it? Are there any other ways around these functions? Thanks a lot for any help.
Related
I am developing a sorting algorithm simulator in C++ using RayLib for the visual simulation and was wondering if there was a way I could implement a tkinter style GUI to make a sidebar for the window and allow the user to control the simulation
I have tried using RayGUI however currently some of the files use C only functions and syntax which do not work with C++
Is there any way I can achieve this? I don't mind changing libraries but I would prefer to stay with RayLib. I have also considered using pure tkinter and using tkinter canvas to draw the simulation but that is a last resort option.
Here is a rough diagram of what I would like to achieve (the right section would be a tkinter style sidebar)
https://github.com/Spacerulerwill/Algorithm-Visualiser/blob/master/img/sortUI.png
I am interested in making a game trainer but I stumbled over the question of making a menu which the player can choose from. I am using C++ and my target client is windows based.
I searched around and people mostly use DirectX and hook into the game to draw (A little bit like the discord overlay) but I find it extremely difficult to use DirectX.
Here is an example I found:
I really like the way the SFML library draws but I can't seem to find any APIs which support that ease of drawing.
I once did manage to make a menu in C# by using System.Drawing to draw an external overlay which I could draw to using C#'s brush API, however I prefer to write in C++ as I feel I can do more in that language.
My question is:
Is the a way I could use something like the System.Drawing/SFML API to draw an overlay over another window in C++ (Which would be accessible in a console application)?
Is it easily portable (As a DLL or even including a header)? (Most of the solutions I have seen are not portable and/or widely supported)
Check out Qt for drawing images, text, etc.
http://doc.qt.io/qt-5/qtwidgets-painting-basicdrawing-example.html
It is widely supported, and also cross-platform
You can create a transparent window and use setWindowFlags(Qt::WindowStaysOnTopHint);
I am building a c++ maze project for school and want to create a 2d graphics window in c++ that will let me render something like this http://www.dreamincode.net/forums/uploads/monthly_07_2011/post-114496-13104660729008.png.
Can anyone suggest a 2d graphics library to use? I have looked into openGL but am worried that the geometry necessary is too complicated for what I need. Of course I may be overlooking some things.
I am working in Xcode on OS X and if the library is not multiplatform that is okay. Can anyone suggest me something?
The Qt framework is a cross-platform solution for building applications.
There is a basic drawing example that shows how to use basic graphic primitives:
The core of the technique consists in reimplementing a widget's paintEvent() method to control how it is displayed (painted) on the screen. The QPainter class provides many drawing methods to suit your needs.
Since cross-platform is not a problem, just use Quartz or SpriteKit. Quartz is general 2D drawing, SpriteKit is specifically for games. All the docs you can access directly in Xcode through the documentation window, and Apple provides a bunch of sample code too.
I am using glui to add a control panel to my OpenGl code. This is a visualisation interface for a large scale simulation platform written in C++.
I was wondering if it is possible to make changes to the background colours of the panels?
If this is not possible, can anyone comment on how slower my display will become if I switch to using pyQt with OpenGL? And would it be possible to access information on my C++ classes and display them with a pyQt approach? (I am happy to make this a second thread if you think it is better that way.)
For background color change of glui-based panel, its not clear what you are asking but I don't see why it would not support such a basic op. Update: I would try using glClearColor like on that link.
For speed it really depends on what and how you're going to use opengl: see pyopengl: Could it replace c++? for a good discussion.
For using your c++ from python this is usually relatively easy by using SWIG (swig.org). You tell SWIG what parts of your c++ api you want to access from python and SWIG generates the code to make your c++ available as a python module.
I'm a Rails/web developer with little experience with C++, so I'm not totally sure what direction to head in: I'm looking to build a simple simulator that I can use to test an algorithm I'm building that converts standard images to radial coordinates, and all I really need to be able to do is to plot points (which will represent LEDs) on a blank window and continuously refresh them (the LEDs blink). I don't want to build a gui; command line is fine, as I'll be the only person using the tool.
I'm not sure whether this is even possible or not... I did some Java programming years ago and I remember being able to pretty easily open a window and render images in it. Is there a C++ equivalent?
Thanks in advance!
What you are describing is a perfect fit for a GUI application, rather than command line, as far as I understand.
But if you want something really simple, and not spend some time learning a GUI development framework (MFC, Qt, WxWidgets, etc), you should check the following resources:
character based basic console graphics
some more advanced console graphics with blinking, box drawing, etc.
using full GDI graphics on console
It's not that easy in C++, because there is no standard way in doing this. It's not part of the language. There are a lot of frameworks though, some lightweight and some bloating. It also depends your platform. Anyhow, I think I would use OpenGL and do that calculation thing in a shader. That way you don't have to recompile and rerun all the C++ code. You can even do it in way that updates the GPU shader whenever you save your shader file giving you immediate results.