Sprite and memory output targets for StartVectorDrawing()
Posted: Tue Jan 31, 2017 9:25 am
It would be useful if there were output options for StartVectorDrawing that included the ability to send the vector drawing output to a sprite or a memory buffer.
eg.
StartVectorDrawing( SpriteVectorOutput( #sprite ) )
StartVectorDrawing( MemoryVectorOutput( *buffer ) )
Currently I'm converting a jigsaw puzzle program that uses images drawn onto a canvas gadget to a sprite and screen setup. The puzzle piece images are generated using the vector drawing library. Since there's no sprite output option for StartVectorDrawing I have to draw the output to an image and then copy it to a sprite. I'm having trouble getting the alpha data to copy over though, for some reason (I need to investigate the DrawingBuffer functionality to see if that will work with alpha). Being able to render the vector drawing output directly onto a sprite would simplify and speed up this process greatly. If that's not practical for some reason then sending the pixel data for the vector output to a memory buffer would make it a lot easier to work with that data when copying it to a sprite in a StartDrawing block, and would also be a versatile option for people who just need the pixel data.
eg.
StartVectorDrawing( SpriteVectorOutput( #sprite ) )
StartVectorDrawing( MemoryVectorOutput( *buffer ) )
Currently I'm converting a jigsaw puzzle program that uses images drawn onto a canvas gadget to a sprite and screen setup. The puzzle piece images are generated using the vector drawing library. Since there's no sprite output option for StartVectorDrawing I have to draw the output to an image and then copy it to a sprite. I'm having trouble getting the alpha data to copy over though, for some reason (I need to investigate the DrawingBuffer functionality to see if that will work with alpha). Being able to render the vector drawing output directly onto a sprite would simplify and speed up this process greatly. If that's not practical for some reason then sending the pixel data for the vector output to a memory buffer would make it a lot easier to work with that data when copying it to a sprite in a StartDrawing block, and would also be a versatile option for people who just need the pixel data.