Make it clear to me..

BlitzMax Forums/BlitzMax Programming/Make it clear to me..

plash(Posted 2006) [#1]
The GrabImage function is what you use to 'draw' to images, instead of buffers, correct?


GfK(Posted 2006) [#2]
Exactly as the docs say - grabs an image from the backbuffer.


ImaginaryHuman(Posted 2006) [#3]
Pixmaps is what you draw to. Whether you load one, or create one, or create one by grabbing the backbuffer, or you lock an image and it turns into one, you are working with the pixmap.


FlameDuck(Posted 2006) [#4]
The GrabImage function is what you use to 'draw' to images, instead of buffers, correct?
No.


plash(Posted 2006) [#5]
No.
How do you draw directly to images then?


ImaginaryHuman(Posted 2006) [#6]
You can only draw directly to pixmaps. You have to grab the image, or create a new pixmap, or load a pixmap, and then modify the pixmap. Then re-upload it as an image in order to draw it.


plash(Posted 2006) [#7]
Why did they have to change it!?
It was so simple with imagebuffers :(

Can anyone give me an example, or does one come with BlitzMax?


tonyg(Posted 2006) [#8]
writepixel is used to draw directly to images.
To do the same with GrabImage you must...
cls
drawimage1
draw_other-stuff
grabimage


plash(Posted 2006) [#9]
So GrabImage takes a part of the screen and copies it from [x, y, width, height]; then puts it onto an image?


tonyg(Posted 2006) [#10]
Yep