Drawing into a pixmap using DrawLine etc.

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

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.

no its not. you have to draw to the background and grab from there to get it into a pixmap

Ah, that sounds like it may do it. Can I grab the background without flipping?

Yep although it is simple to test.

Thanks a lot, that worked a treat!

Write your own line drawing routine, it's not very hard, look in the code archives for the bresenham line-drawing routine.