This question comes from my necessity to write a class that unifies Cairo and Canvas, much like what OpenFL already does, as I understand. So perhaps the best solution to this is for Lime itself to have a wrapper for Cairo that uses Canvas for HTML5 targets.
So I created a
var canvas:CanvasElement = Browser.document.createCanvasElement(); canvas.width = 600; canvas.height = 600; var context:CanvasRenderingContext2D = canvas.getContext2d();
Then I create an
Image from the
var image:Image = Image.fromCanvas(canvas);
This works great the first time I access the
Image's data. But after I update the
Image remains unchanged.
I’ve tried a few ways to force the
Image to update, but the only thing that worked (while maintaining transparency) was creating a new
Image every time, which is wasteful.
Is there a recommended way to update an existing
Image based on a