painting photos
BlitzPlus Forums/BlitzPlus Programming/painting photos
| ||
How do you put graphics on images. I only know the commands createimage and saveimage. But how do you draw on the image. |
| ||
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 |
| ||
thanks Matty. I will let you know how it goes. |
| ||
Matty,can you also use rect/line/oval ? |
| ||
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. |
| ||
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. |
| ||
in fact you can just use any command that actually draws something - you can even draw another image in your image |