graphx icon indicating copy to clipboard operation
graphx copied to clipboard

How to make GSprite from Uint8List Image

Open app-chain-hagio opened this issue 1 year ago • 2 comments

Sorry for the beginner's question. How to make GSprite from Uint8List Image?

app-chain-hagio avatar Apr 04 '24 04:04 app-chain-hagio

Well, a GSprite is mostly a "container" to add other display objects but has a graphics property to draw things in it as well. If you wanna display an Image (from the bytes) is more performant an easier to use a GBitmap (which is a display object as well) and add it as child of a Gsprite, Another approach is using the Image as a "fill" for drawing, with a GShape or a GSprite, and access the graphics.beginBitmapFill. I will try to post an example later here for you, but dig into the examples source codes in the meantime to see how to render images with graphx

roipeker avatar Apr 04 '24 11:04 roipeker

Thank you.  I should have told you first. So, I want to use a flutter screenshot (Uinit8List) as a background.

app-chain-hagio avatar Apr 06 '24 10:04 app-chain-hagio