0

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();
GPPSoft
  • 480
  • 1
  • 6
  • 15

1 Answers1

2

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).

Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313