| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:math' as math; | 5 import 'dart:math' as math; |
| 6 import 'dart:sky' as sky; | 6 import 'dart:sky' as sky; |
| 7 | 7 |
| 8 import 'package:vector_math/vector_math.dart'; | 8 import 'package:vector_math/vector_math.dart'; |
| 9 | 9 |
| 10 import '../base/debug.dart'; | 10 import '../base/debug.dart'; |
| (...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 markNeedsPaint(); | 886 markNeedsPaint(); |
| 887 } | 887 } |
| 888 | 888 |
| 889 void scale(x, [double y, double z]) { | 889 void scale(x, [double y, double z]) { |
| 890 _transform.scale(x, y, z); | 890 _transform.scale(x, y, z); |
| 891 markNeedsPaint(); | 891 markNeedsPaint(); |
| 892 } | 892 } |
| 893 | 893 |
| 894 void hitTestChildren(HitTestResult result, { Point position }) { | 894 void hitTestChildren(HitTestResult result, { Point position }) { |
| 895 Matrix4 inverse = new Matrix4.zero(); | 895 Matrix4 inverse = new Matrix4.zero(); |
| 896 double det = inverse.copyInverse(_transform); | 896 /* double det = */ inverse.copyInverse(_transform); |
| 897 // TODO(abarth): Check the determinant for degeneracy. | 897 // TODO(abarth): Check the determinant for degeneracy. |
| 898 | 898 |
| 899 Vector3 position3 = new Vector3(position.x, position.y, 0.0); | 899 Vector3 position3 = new Vector3(position.x, position.y, 0.0); |
| 900 Vector3 transformed3 = inverse.transform3(position3); | 900 Vector3 transformed3 = inverse.transform3(position3); |
| 901 Point transformed = new Point(transformed3.x, transformed3.y); | 901 Point transformed = new Point(transformed3.x, transformed3.y); |
| 902 super.hitTestChildren(result, position: transformed); | 902 super.hitTestChildren(result, position: transformed); |
| 903 } | 903 } |
| 904 | 904 |
| 905 void paint(RenderObjectDisplayList canvas) { | 905 void paint(RenderObjectDisplayList canvas) { |
| 906 canvas.save(); | 906 canvas.save(); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1077 | 1077 |
| 1078 void defaultPaint(RenderObjectDisplayList canvas) { | 1078 void defaultPaint(RenderObjectDisplayList canvas) { |
| 1079 RenderBox child = firstChild; | 1079 RenderBox child = firstChild; |
| 1080 while (child != null) { | 1080 while (child != null) { |
| 1081 assert(child.parentData is ParentDataType); | 1081 assert(child.parentData is ParentDataType); |
| 1082 canvas.paintChild(child, child.parentData.position); | 1082 canvas.paintChild(child, child.parentData.position); |
| 1083 child = child.parentData.nextSibling; | 1083 child = child.parentData.nextSibling; |
| 1084 } | 1084 } |
| 1085 } | 1085 } |
| 1086 } | 1086 } |
| OLD | NEW |