Please tell me this analogue in Qt. How to implement this in Qt? Thx!
BitmapData btmData= currentRegionMap.LockBits(new Rectangle(x, y, width, height), ImageLockMode.ReadOnly, currentRegionMap.PixelFormat);
byte* a = (byte*)btmData.Scan0.ToPointer();
There is no need to do this in Qt. In Qt, the LockBits
is a No-Op. You need to be using the QImage
class, that's about it. You can paint on a QImage
by starting a QPainter
on it, or by tweaking its binary data. Eventually you convert it to a QPixmap
and you can draw it on the screen (in a widget or window).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.