Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Mask image: QBitmap?, C-style arrays? or something else?
isaacEnrique last edited by
I'm writing a tool that , among other things, displays an image and allows the user with the mouse to highlight areas of interest (drawing rectangles) on that image.
These rectangles drawn once can be resized by the user (using the mouse). Thus, when the mouse cursor is located on a corner (or the midpoint of one side ) of any of the painted rectangles, the cursor changes shape and allows the user to resize the rectangle .
Each time the mouse moves over the image, I need to know if the point where the cursor is located corresponds to one of the corners (or one of the midpoints of each side) of one of the painted rectangle . To do this so fast , I intend to use an image (0s and 1s) that serves as a mask.
Initially I thought of using the QBitmap class (to save memory) , but apparently this class does not allow direct access to each position or pixel. Now I'm not sure that I use: A two-dimensional array in C style?, QVector? or is it something else?
Thanks in advance for any help and/or suggestions.