I solved the problem in the following way:
var image = new Image();
image.src = source;
circle.graphics.beginBitmapFill(image, "no-repeat").drawCircle(0,0,25);
Question
I'm trying to draw a circle that is filled with a bitmap, but I'm receiving the following error:
Failed to execute 'createPattern' on 'CanvasRenderingContext2D': No function was found that matched the signature provided.
code:
var bitmap = new createjs.Bitmap(picture);
var circle = new createjs.Shape();
circle.graphics.clear().beginBitmapFill(bitmap, "no-repeat",this.getCanvasContainer().getMatrix())
.beginStroke("yellow").drawCircle(0,0,50);
this.getCanvasContainer().addChild(circle);
Solution
I solved the problem in the following way:
var image = new Image();
image.src = source;
circle.graphics.beginBitmapFill(image, "no-repeat").drawCircle(0,0,25);