How to draw on CanvasItem, then save image as PNG

w7xw7x Posts: 3Member
in 2D

I draw on a custom control derived from TextureRect (which derives from CanvasItem) and all works very well, but I can't see how I can save the fruits of my labour as a PNG image.

My custom control could derive from something else, I only chose TextureRect because it seemed to have all I need. In truth I just need a blank canvas to draw on, and I wish to preserve the picture drawn as PNG on the file system.

Where did I go wrong?

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file