Commit 7d3a6c4a authored by Viktor Lidholt's avatar Viktor Lidholt

Merge pull request #527 from vlidholt/master

Adds optional rect property to sprite layer class
parents 2701b469 9b898cff
part of sprites;
class Layer extends Node with SpritePaint {
Rect layerRect;
Layer([Rect this.layerRect = null]);
Paint _cachedPaint = new Paint()
..setFilterQuality(FilterQuality.low)
..isAntiAlias = false;
......@@ -9,7 +13,7 @@ class Layer extends Node with SpritePaint {
super._prePaint(canvas, matrix);
_updatePaint(_cachedPaint);
canvas.saveLayer(null, _cachedPaint);
canvas.saveLayer(layerRect, _cachedPaint);
}
void _postPaint(PaintingCanvas canvas, Matrix4 totalMatrix) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment