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

Side by Side Diff: sky/examples/game/lib/sprite_box.dart

Issue 1164073002: Fix build after hixie's rename (Closed) Base URL: git@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 unified diff | Download patch
« no previous file with comments | « sky/examples/fn2/container.dart ('k') | sky/sdk/lib/framework/fn2.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 void handleEvent(Event event) { 44 void handleEvent(Event event) {
45 switch (event.type) { 45 switch (event.type) {
46 case 'pointerdown': 46 case 'pointerdown':
47 print("pointerdown"); 47 print("pointerdown");
48 break; 48 break;
49 } 49 }
50 } 50 }
51 51
52 void paint(RenderNodeDisplayList canvas) { 52 void paint(RenderObjectDisplayList canvas) {
53 // Move to correct coordinate space before drawing 53 // Move to correct coordinate space before drawing
54 double scaleX = 1.0; 54 double scaleX = 1.0;
55 double scaleY = 1.0; 55 double scaleY = 1.0;
56 double offsetX = 0.0; 56 double offsetX = 0.0;
57 double offsetY = 0.0; 57 double offsetY = 0.0;
58 58
59 switch(transformMode) { 59 switch(transformMode) {
60 case SpriteBoxTransformMode.stretch: 60 case SpriteBoxTransformMode.stretch:
61 scaleX = size.width/_systemWidth; 61 scaleX = size.width/_systemWidth;
62 scaleY = size.height/_systemHeight; 62 scaleY = size.height/_systemHeight;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // Count the number of frames we've been running 130 // Count the number of frames we've been running
131 _numFrames += 1; 131 _numFrames += 1;
132 132
133 // Print frame rate 133 // Print frame rate
134 if (_numFrames % 60 == 0) print("delta: ${delta} fps: ${1.0/delta}"); 134 if (_numFrames % 60 == 0) print("delta: ${delta} fps: ${1.0/delta}");
135 135
136 _rootNode.update(delta); 136 _rootNode.update(delta);
137 _scheduleTick(); 137 _scheduleTick();
138 } 138 }
139 } 139 }
OLDNEW
« no previous file with comments | « sky/examples/fn2/container.dart ('k') | sky/sdk/lib/framework/fn2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698