Commit 17ef9488 authored by Ian Hickson's avatar Ian Hickson

Transition callers from 'concat' to 'transform'

See: https://github.com/flutter/flutter/issues/1080
parent 606887a1
...@@ -39,7 +39,7 @@ ui.Picture paint(ui.Rect paintBounds) { ...@@ -39,7 +39,7 @@ ui.Picture paint(ui.Rect paintBounds) {
0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0,
]); ]);
canvas.concat(scaleMatrix); canvas.transform(scaleMatrix);
paint.color = const ui.Color.fromARGB(128, 0, 255, 0); paint.color = const ui.Color.fromARGB(128, 0, 255, 0);
canvas.drawCircle(ui.Point.origin, radius, paint); canvas.drawCircle(ui.Point.origin, radius, paint);
......
...@@ -379,7 +379,7 @@ class _InkSplash extends InkFeature implements InkSplash { ...@@ -379,7 +379,7 @@ class _InkSplash extends InkFeature implements InkSplash {
Offset originOffset = MatrixUtils.getAsTranslation(transform); Offset originOffset = MatrixUtils.getAsTranslation(transform);
if (originOffset == null) { if (originOffset == null) {
canvas.save(); canvas.save();
canvas.concat(transform.storage); canvas.transform(transform.storage);
if (clipToReferenceBox) if (clipToReferenceBox)
canvas.clipRect(Point.origin & referenceBox.size); canvas.clipRect(Point.origin & referenceBox.size);
if (repositionToReferenceBox) if (repositionToReferenceBox)
...@@ -465,7 +465,7 @@ class _InkHighlight extends InkFeature implements InkHighlight { ...@@ -465,7 +465,7 @@ class _InkHighlight extends InkFeature implements InkHighlight {
Offset originOffset = MatrixUtils.getAsTranslation(transform); Offset originOffset = MatrixUtils.getAsTranslation(transform);
if (originOffset == null) { if (originOffset == null) {
canvas.save(); canvas.save();
canvas.concat(transform.storage); canvas.transform(transform.storage);
_paintHighlight(canvas, Point.origin & referenceBox.size, paint); _paintHighlight(canvas, Point.origin & referenceBox.size, paint);
canvas.restore(); canvas.restore();
} else { } else {
......
...@@ -278,7 +278,7 @@ class PaintingContext { ...@@ -278,7 +278,7 @@ class PaintingContext {
Matrix4 offsetMatrix = new Matrix4.translationValues(offset.dx, offset.dy, 0.0); Matrix4 offsetMatrix = new Matrix4.translationValues(offset.dx, offset.dy, 0.0);
Matrix4 transformWithOffset = offsetMatrix * transform; Matrix4 transformWithOffset = offsetMatrix * transform;
canvas.save(); canvas.save();
canvas.concat(transformWithOffset.storage); canvas.transform(transformWithOffset.storage);
painter(this, Offset.zero); painter(this, Offset.zero);
canvas.restore(); canvas.restore();
} }
......
...@@ -337,7 +337,7 @@ class SpriteBox extends RenderBox { ...@@ -337,7 +337,7 @@ class SpriteBox extends RenderBox {
// Move to correct coordinate space before drawing // Move to correct coordinate space before drawing
canvas.translate(offset.dx, offset.dy); canvas.translate(offset.dx, offset.dy);
canvas.concat(transformMatrix.storage); canvas.transform(transformMatrix.storage);
// Draw the sprite tree // Draw the sprite tree
Matrix4 totalMatrix = new Matrix4.fromFloat64List(canvas.getTotalMatrix()); Matrix4 totalMatrix = new Matrix4.fromFloat64List(canvas.getTotalMatrix());
......
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