PixMap?

BlitzMax Forums/BlitzMax Beginners Area/PixMap?

Craig H. Nisbet(Posted 2007) [#1]
Can anyone explain to me what a pixMap is? Or perhaps give me an example of how to use it?


tonyg(Posted 2007) [#2]
Pixmaps provide storage for rectangular regions of pixels.

You can create a new pixmap using the CreatePixmap command, or load a pixmap using LoadPixmap.



Basically a list in system memory describing each pixel in an image. The image *can* be drawn directly to the backbuffer buit it is slower than drawimage which converts the pixmap to a textured surface kept in video memory. However, with a pixmap, you have access to the pixels so are able to change them.


Craig H. Nisbet(Posted 2007) [#3]
Just tested this. Works really good! Looks like it's still a little slow, but nearly as bad as blitz3d.


Diordna(Posted 2007) [#4]
I hope you're not going to start using them for game sprites...that's what TImage is for.


Craig H. Nisbet(Posted 2007) [#5]
No, I wanted to write a utility that moves parts of the image around.