painting photos

BlitzPlus Forums/BlitzPlus Programming/painting photos

Heliotrope(Posted 2010) [#1]
How do you put graphics on images. I only know the commands createimage and saveimage. But how do you draw on the image.


Matty(Posted 2010) [#2]
You need to set the current drawing buffer to the imagebuffer:

setbuffer imagebuffer(yourimagehandle)

;draw stuff with drawimage/text/plot/writepixel(fast)

setbuffer backbuffer() ;set the current drawing buffer back to the backbuffer

drawimage yourimagehandle,0,0 ;draw the recently drawn on image




Heliotrope(Posted 2010) [#3]
thanks Matty. I will let you know how it goes.


Heliotrope(Posted 2010) [#4]
Matty,can you also use rect/line/oval ?


Heliotrope(Posted 2010) [#5]
Matty,I have a problem. I can create, save and get images on the run screan but thay don't stick to the new image.


_PJ_(Posted 2010) [#6]
drawimage yourimagehandle,0,0 ;draw the recently drawn on image


You need to draw the image each time the screen is refreshed.

i.e.

While Not Keydown(1)
DrawImage MyImage,x,y
Flip
Wend

Otherwise each time Flip is called, the display buffer is reset.

And yyes, you can use Rect/Oval or any of the drawing commands to write to any buffer.


Stamm(Posted 2010) [#7]
in fact you can just use any command that actually draws something - you can even draw another image in your image