Commit 8b4d0201 authored by Viktor Lidholt's avatar Viktor Lidholt

Fixes compilation errors in sprites

parent 3b4093e1
...@@ -416,7 +416,7 @@ class Node { ...@@ -416,7 +416,7 @@ class Node {
} }
void _prePaint(PaintingCanvas canvas) { void _prePaint(PaintingCanvas canvas) {
_savedTotalMatrix = canvas.getTotalMatrix(); _savedTotalMatrix = new Matrix4.fromFloat32List(canvas.getTotalMatrix());;
// Get the transformation matrix and apply transform // Get the transformation matrix and apply transform
canvas.concat(transformMatrix.storage); canvas.concat(transformMatrix.storage);
...@@ -467,7 +467,7 @@ class Node { ...@@ -467,7 +467,7 @@ class Node {
} }
void _postPaint(PaintingCanvas canvas) { void _postPaint(PaintingCanvas canvas) {
canvas.setMatrix(_savedTotalMatrix); canvas.setMatrix(_savedTotalMatrix.storage);
} }
// Receiving update calls // Receiving update calls
......
...@@ -68,7 +68,7 @@ class Sprite extends NodeWithSize { ...@@ -68,7 +68,7 @@ class Sprite extends NodeWithSize {
void paint(PaintingCanvas canvas) { void paint(PaintingCanvas canvas) {
// Store old matrix // Store old matrix
Matrix4 savedMatrix = canvas.getTotalMatrix(); Matrix4 savedMatrix = new Matrix4.fromFloat32List(canvas.getTotalMatrix());
// Account for pivot point // Account for pivot point
applyTransformForPivot(canvas); applyTransformForPivot(canvas);
...@@ -113,6 +113,6 @@ class Sprite extends NodeWithSize { ...@@ -113,6 +113,6 @@ class Sprite extends NodeWithSize {
} }
// Restore matrix // Restore matrix
canvas.setMatrix(savedMatrix); canvas.setMatrix(savedMatrix.storage);
} }
} }
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