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

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

Issue 1214833004: Split Size into Size and Offset. (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/lib/example/game/lib/game_demo_world.dart ('k') | sky/sdk/lib/example/game/lib/sprite_box.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/example/game/lib/sprite.dart
diff --git a/sky/sdk/lib/example/game/lib/sprite.dart b/sky/sdk/lib/example/game/lib/sprite.dart
index 6202e20e30b4abced89a1f19f36f9fe7311b3145..c2394cc87f79c9ef92490254aff6c38e8c76848b 100644
--- a/sky/sdk/lib/example/game/lib/sprite.dart
+++ b/sky/sdk/lib/example/game/lib/sprite.dart
@@ -106,7 +106,7 @@ class Sprite extends NodeWithSize {
if (texture.rotated) {
// Calculate the rotated frame and spriteSourceSize
Size originalFrameSize = texture.frame.size;
- Rect rotatedFrame = new Rect.fromPointAndSize(texture.frame.upperLeft, new Size(originalFrameSize.height, originalFrameSize.width));
+ Rect rotatedFrame = new Rect.fromPointAndSize(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);
« no previous file with comments | « sky/sdk/lib/example/game/lib/game_demo_world.dart ('k') | sky/sdk/lib/example/game/lib/sprite_box.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698