Skip to content

Commit cc1dba4

Browse files
authored
Merge pull request phaserjs#3511 from hexus/fix/graphics-generate-texture
Fixed renderCanvas() call in Graphics.generateTexture()
2 parents d1788d8 + f70f92b commit cc1dba4

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/gameobjects/graphics/Graphics.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -915,10 +915,10 @@ var Graphics = new Class({
915915
/**
916916
* Creates a pie-chart slice shape centered at `x`, `y` with the given radius.
917917
* You must define the start and end angle of the slice.
918-
*
918+
*
919919
* Setting the `anticlockwise` argument to `true` creates a shape similar to Pacman.
920920
* Setting it to `false` creates a shape like a slice of pie.
921-
*
921+
*
922922
* This method will begin a new path and close the path at the end of it.
923923
* To display the actual slice you need to call either `strokePath` or `fillPath` after it.
924924
*
@@ -1133,7 +1133,7 @@ var Graphics = new Class({
11331133

11341134
if (ctx)
11351135
{
1136-
this.renderCanvas(sys.game.renderer, this, 0, Graphics.TargetCamera, ctx);
1136+
this.renderCanvas(sys.game.renderer, this, 0.0, Graphics.TargetCamera, null, ctx);
11371137

11381138
if (sys.game.renderer.gl && texture)
11391139
{

src/gameobjects/graphics/GraphicsCanvasRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ var GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, c
7070
}
7171

7272
ctx.save();
73-
if (parentMatrix !== undefined)
73+
if (parentMatrix)
7474
{
7575
var matrix = parentMatrix.matrix;
7676
ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);

0 commit comments

Comments
 (0)