Pixmap, what exactly are they?

BlitzMax Forums/BlitzMax Beginners Area/Pixmap, what exactly are they?

In the pre-bm days we'd set an imagebuffer to draw onto an image, in bmax you need to:

lock that image:

local PM:TPixmap=LockImage(MyImage)

then draw to the pixmap:

WritePixel PM,x,y,AlphaRedGreenBlue
(typically I do $ff000000|65536*r+256*g+b, also make sure x and y don't go out of range!)

and then unlock the image again:

UnlockImage MyImage

and there's your updated image!