Fix canvas Image clone

This commit is contained in:
Joshua Granick
2015-07-13 16:54:07 -07:00
parent 21d711550b
commit 3b6b47d278

View File

@@ -158,6 +158,13 @@ class Image {
public function clone ():Image {
var image = new Image (buffer.clone (), offsetX, offsetY, width, height, null, type);
if (image.type == CANVAS && image.buffer.data != null && image.buffer.__srcCanvas == null) {
ImageCanvasUtil.convertToCanvas (image);
}
image.dirty = dirty;
return image;