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

Side by Side Diff: sky/sdk/example/game/lib/texture.dart

Issue 1210173004: Move examples to //sky/sdk/example (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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/sdk/example/game/lib/spritesheet.dart ('k') | sky/sdk/example/game/main.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 /// A texture represents a rectangular area of an image and is typically used to draw a sprite to the screen. 3 /// A texture represents a rectangular area of an image and is typically used to draw a sprite to the screen.
4 /// 4 ///
5 /// Normally you get a reference to a texture from a [SpriteSheet], but you can also create one from an [Image]. 5 /// Normally you get a reference to a texture from a [SpriteSheet], but you can also create one from an [Image].
6 class Texture { 6 class Texture {
7 /// The image that this texture is a part of. 7 /// The image that this texture is a part of.
8 /// 8 ///
9 /// var textureImage = myTexture.image; 9 /// var textureImage = myTexture.image;
10 final Image image; 10 final Image image;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 Texture._fromSpriteFrame(this.image, this.name, this.size, this.rotated, this. trimmed, this.frame, 64 Texture._fromSpriteFrame(this.image, this.name, this.size, this.rotated, this. trimmed, this.frame,
65 this.spriteSourceSize, this.pivot) { 65 this.spriteSourceSize, this.pivot) {
66 } 66 }
67 67
68 // Texture textureFromRect(Rect rect, [String name = null]) { 68 // Texture textureFromRect(Rect rect, [String name = null]) {
69 // assert(rect != null); 69 // assert(rect != null);
70 // Rect frame = new Rect.fromLTRB(); 70 // Rect frame = new Rect.fromLTRB();
71 // return new Texture._fromSpriteFrame(image, name, rect.size, false, false, ); 71 // return new Texture._fromSpriteFrame(image, name, rect.size, false, false, );
72 // } 72 // }
73 } 73 }
OLDNEW
« no previous file with comments | « sky/sdk/example/game/lib/spritesheet.dart ('k') | sky/sdk/example/game/main.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698