| OLD | NEW |
| 1 part of sprites; | 1 part of sprites; |
| 2 | 2 |
| 3 enum SpriteBoxTransformMode { | 3 enum SpriteBoxTransformMode { |
| 4 nativePoints, | 4 nativePoints, |
| 5 letterbox, | 5 letterbox, |
| 6 stretch, | 6 stretch, |
| 7 scaleToFit, | 7 scaleToFit, |
| 8 fixedWidth, | 8 fixedWidth, |
| 9 fixedHeight, | 9 fixedHeight, |
| 10 } | 10 } |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 _transformMatrix.scale(scaleX, scaleY); | 223 _transformMatrix.scale(scaleX, scaleY); |
| 224 | 224 |
| 225 return _transformMatrix; | 225 return _transformMatrix; |
| 226 } | 226 } |
| 227 | 227 |
| 228 void _invalidateTransformMatrix() { | 228 void _invalidateTransformMatrix() { |
| 229 _transformMatrix = null; | 229 _transformMatrix = null; |
| 230 _rootNode._invalidateToBoxTransformMatrix(); | 230 _rootNode._invalidateToBoxTransformMatrix(); |
| 231 } | 231 } |
| 232 | 232 |
| 233 void paint(RenderObjectDisplayList canvas) { | 233 void paint(RenderCanvas canvas) { |
| 234 canvas.save(); | 234 canvas.save(); |
| 235 | 235 |
| 236 // Move to correct coordinate space before drawing | 236 // Move to correct coordinate space before drawing |
| 237 canvas.concat(transformMatrix.storage); | 237 canvas.concat(transformMatrix.storage); |
| 238 | 238 |
| 239 // Draw the sprite tree | 239 // Draw the sprite tree |
| 240 _rootNode._visit(canvas); | 240 _rootNode._visit(canvas); |
| 241 | 241 |
| 242 canvas.restore(); | 242 canvas.restore(); |
| 243 } | 243 } |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 SpriteBoxHitTestEntry(RenderBox target, Point localPosition) : super(target, l
ocalPosition); | 316 SpriteBoxHitTestEntry(RenderBox target, Point localPosition) : super(target, l
ocalPosition); |
| 317 } | 317 } |
| 318 | 318 |
| 319 class SpriteBoxEvent { | 319 class SpriteBoxEvent { |
| 320 Point boxPosition; | 320 Point boxPosition; |
| 321 String type; | 321 String type; |
| 322 int pointer; | 322 int pointer; |
| 323 | 323 |
| 324 SpriteBoxEvent(this.boxPosition, this.type, this.pointer); | 324 SpriteBoxEvent(this.boxPosition, this.type, this.pointer); |
| 325 } | 325 } |
| OLD | NEW |