Several drawing questions #2453
-
I'm writing an Avalonia application where I am using a custom control that contains an SKCanvas.
I'm already thinking I am going to have to ditch the SKCanvas control and find (or fabricate) something different, maybe using SKBitmaps. I'd just rather not have to :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
1 you can write from one canvas' surface to another canvas,:
watch for size mismatch and commit changes 2 the logic when saving surface to file could be:
output stream to file at will. |
Beta Was this translation helpful? Give feedback.
1 you can write from one canvas' surface to another canvas,:
srcSurface.Draw(destSurface.Canvas, destinationLeft, destinationTop, paint); //if you set paint color to white with alpha, you will draw with opacity of that alpha, like a semi-transparent layer
watch for size mismatch and commit changes
srcSurface.Canvas.Flush()
before copying if needed.2 the logic when saving surface to file could be: