diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index c289721..ba694b9 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -134,6 +134,8 @@ */ this.glDirty = false; + this.boundsDirty = true; + /** * Used to detect if the cached sprite object needs to be updated. * @@ -311,7 +313,7 @@ ya + ( ((cpY + ( (toY - cpY) * j )) - ya) * j ) ); } - this.dirty = true; + this.dirty = this.boundsDirty = true; return this; }; @@ -369,7 +371,7 @@ dt3 * fromY + 3 * dt2 * j * cpY + 3 * dt * t2 * cpY2 + t3 * toY); } - this.dirty = true; + this.dirty = this.boundsDirty = true; return this; }; @@ -437,7 +439,7 @@ this.arc(cx + x1, cy + y1, radius, startAngle, endAngle, b1 * a2 > b2 * a1); } - this.dirty = true; + this.dirty = this.boundsDirty = true; return this; }; @@ -532,7 +534,7 @@ ( (cTheta * -s) + (sTheta * c) ) * radius + cy); } - this.dirty = true; + this.dirty = this.boundsDirty = true; return this; }; @@ -838,13 +840,13 @@ return math.Rectangle.EMPTY; } - if (this.dirty) + if (this.boundsDirty) { this.updateLocalBounds(); this.glDirty = true; this.cachedSpriteDirty = true; - this.dirty = false; + this.boundsDirty = false; } var bounds = this._localBounds; @@ -1150,7 +1152,7 @@ this.currentPath = data; } - this.dirty = true; + this.dirty = this.boundsDirty = true; return data; };