提交 8ef8d8be 编写于 作者: V Viktor Lidholt

Adds optional rect property to sprite layer class

上级 d82eb3fd
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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册