createCanvasImage method
Creates a PCanvasImage instance compatible to this canvas and its painter.
Implementation
@override
PCanvasImage createCanvasImage(Object source, {int? width, int? height}) {
var id = ++_imageIdCount;
if (source is String) {
var imageElement = ImageElement(src: source, width: width, height: height)
..crossOrigin = 'anonymous';
return _PCanvasImageElement('img_$id', imageElement);
} else {
throw ArgumentError("Can't handle image source: $source");
}
}