diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 6d923b5..f341e56 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -672,11 +672,12 @@ * @param scaleMode {number} Should be one of the scaleMode consts * @return {Texture} a texture of the graphics object */ -Graphics.prototype.generateTexture = function (resolution, scaleMode) +Graphics.prototype.generateTexture = function (renderer, resolution, scaleMode) { + resolution = resolution || 1; - var bounds = this.getBounds(); + var bounds = this.getLocalBounds(); var canvasBuffer = new CanvasBuffer(bounds.width * resolution, bounds.height * resolution);