| Index: sky/sdk/example/game/lib/sprite.dart
|
| diff --git a/sky/sdk/example/game/lib/sprite.dart b/sky/sdk/example/game/lib/sprite.dart
|
| index bb022262f4de862054189b699eaf8d2daa279f38..0eea48006110fdd99f8bb659a3adafb37442a5d8 100644
|
| --- a/sky/sdk/example/game/lib/sprite.dart
|
| +++ b/sky/sdk/example/game/lib/sprite.dart
|
| @@ -103,22 +103,7 @@ class Sprite extends NodeWithSize {
|
| }
|
|
|
| // Do actual drawing of the sprite
|
| - if (texture.rotated) {
|
| - // Calculate the rotated frame and spriteSourceSize
|
| - Size originalFrameSize = texture.frame.size;
|
| - Rect rotatedFrame = texture.frame.topLeft & new Size(originalFrameSize.height, originalFrameSize.width);
|
| - Point rotatedSpriteSourcePoint = new Point(
|
| - -texture.spriteSourceSize.top - (texture.spriteSourceSize.bottom - texture.spriteSourceSize.top),
|
| - texture.spriteSourceSize.left);
|
| - Rect rotatedSpriteSourceSize = rotatedSpriteSourcePoint & new Size(originalFrameSize.height, originalFrameSize.width);
|
| -
|
| - // Draw the rotated sprite
|
| - canvas.rotate(-Math.PI/2.0);
|
| - canvas.drawImageRect(texture.image, rotatedFrame, rotatedSpriteSourceSize, paint);
|
| - } else {
|
| - // Draw the sprite
|
| - canvas.drawImageRect(texture.image, texture.frame, texture.spriteSourceSize, paint);
|
| - }
|
| + texture.drawTexture(canvas, Point.origin, paint);
|
| } else {
|
| // Paint a red square for missing texture
|
| canvas.drawRect(new Rect.fromLTRB(0.0, 0.0, size.width, size.height),
|
|
|