开发者

How to copy from one canvas to another

开发者 https://www.devze.com 2023-01-18 09:41 出处:网络
I want to copy the image drawn in one ca开发者_Python百科nvas (details) into another canvas. The commonly discussed solution of using bitmaps will not work because the Bitmap class does not have many

I want to copy the image drawn in one ca开发者_Python百科nvas (details) into another canvas. The commonly discussed solution of using bitmaps will not work because the Bitmap class does not have many of the important methods belonging to the Canvas class. Are there any other solutions?


A Canvas is always used to draw either on screen or onto a Bitmap. The solution of using Bitmaps works perfectly well: create a Bitmap, create a Canvas to draw onto that Bitmap, then draw the Bitmap onto another Canvas. You also record all drawing commands in a Picture and replay them on a different Canvas.

0

精彩评论

暂无评论...
验证码 换一张
取 消