Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(545)

Unified Diff: sky/sdk/example/game/lib/texture.dart

Issue 1215163003: Random cleanup of various Dart things in our tree. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/sdk/example/game/lib/sprites.dart ('k') | sky/sdk/example/game/main.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/example/game/lib/texture.dart
diff --git a/sky/sdk/example/game/lib/texture.dart b/sky/sdk/example/game/lib/texture.dart
index 1c22e4ca88ea0400dddc0d24de67c97f2a09007a..4a1d0d3c06ef02fd74a67af57da04d213b9ce0b1 100644
--- a/sky/sdk/example/game/lib/texture.dart
+++ b/sky/sdk/example/game/lib/texture.dart
@@ -87,11 +87,11 @@ class Texture {
if (rotated) {
// Calculate the rotated frame and spriteSourceSize
Size originalFrameSize = frame.size;
- Rect rotatedFrame = new Rect.fromPointAndSize(frame.upperLeft, new Size(originalFrameSize.height, originalFrameSize.width));
+ Rect rotatedFrame = frame.topLeft & new Size(originalFrameSize.height, originalFrameSize.width);
Point rotatedSpriteSourcePoint = new Point(
-spriteSourceSize.top - (spriteSourceSize.bottom - spriteSourceSize.top),
spriteSourceSize.left);
- Rect rotatedSpriteSourceSize = new Rect.fromPointAndSize(rotatedSpriteSourcePoint, new Size(originalFrameSize.height, originalFrameSize.width));
+ Rect rotatedSpriteSourceSize = rotatedSpriteSourcePoint & new Size(originalFrameSize.height, originalFrameSize.width);
// Draw the rotated sprite
canvas.rotate(-Math.PI/2.0);
« no previous file with comments | « sky/sdk/example/game/lib/sprites.dart ('k') | sky/sdk/example/game/main.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698