Drawing into a pixmap using DrawLine etc.

BlitzMax Forums/BlitzMax Beginners Area/Drawing into a pixmap using DrawLine etc.

Daryl(Posted 2008) [#1]
Apologies if this has been covered before, I couldn't see anything by searching.

Basically I'm pre-caching some drawing into a TPixmap (from a TImage) using Writepixel, which works a treat. However I'd like to use the standard drawing command to draw lines etc. in this image, is it possible?

I'm thinking I might have to resort to doing my own line drawing algorithm but I'd rather not!

Thanks

Daryl.


Dreamora(Posted 2008) [#2]
no its not. you have to draw to the background and grab from there to get it into a pixmap


Daryl(Posted 2008) [#3]
Ah, that sounds like it may do it. Can I grab the background without flipping?


tonyg(Posted 2008) [#4]
Yep although it is simple to test.


Daryl(Posted 2008) [#5]
Thanks a lot, that worked a treat!


ImaginaryHuman(Posted 2008) [#6]
Write your own line drawing routine, it's not very hard, look in the code archives for the bresenham line-drawing routine.