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

Adds new Layer class

parent 32359d4b
part of sprites;
class Layer extends Node with SpritePaint {
Paint _cachedPaint = new Paint()
..setFilterQuality(FilterQuality.low)
..isAntiAlias = false;
void _prePaint(PaintingCanvas canvas, Matrix4 matrix) {
super._prePaint(canvas, matrix);
_updatePaint(_cachedPaint);
canvas.saveLayer(null, _cachedPaint);
}
void _postPaint(PaintingCanvas canvas, Matrix4 totalMatrix) {
canvas.restore();
super._postPaint(canvas, totalMatrix);
}
}
......@@ -21,6 +21,7 @@ import 'package:vector_math/vector_math.dart';
part 'action.dart';
part 'color_secuence.dart';
part 'image_map.dart';
part 'layer.dart';
part 'node.dart';
part 'node3d.dart';
part 'node_with_size.dart';
......
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