Index: sky/examples/game/lib/texture.dart |
diff --git a/sky/examples/game/lib/texture.dart b/sky/examples/game/lib/texture.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..684fdd2b3b66a15123c99e40af395cd7caa4617f |
--- /dev/null |
+++ b/sky/examples/game/lib/texture.dart |
@@ -0,0 +1,33 @@ |
+part of sprites; |
+ |
+class Texture { |
+ final Image image; |
+ final Size size; |
+ String name; |
+ final bool rotated; |
+ final bool trimmed; |
+ |
+ Rect frame; |
+ Rect spriteSourceSize; |
+ |
+ Point pivot; |
+ |
+ Texture(Image image) : |
+ size = new Size(image.width.toDouble(), image.height.toDouble()), |
+ image = image, |
+ trimmed = false, |
+ rotated = false, |
+ frame = new Rect.fromLTRB(0.0, 0.0, image.width.toDouble(), image.height.toDouble()), |
eseidel
2015/06/23 23:22:31
fromPointAndSize ? I guess Image doesn't have a s
|
+ spriteSourceSize = new Rect.fromLTRB(0.0, 0.0, image.width.toDouble(), image.height.toDouble()), |
+ pivot = new Point(0.5, 0.5); |
+ |
+ |
+ Texture._fromSpriteFrame(this.image, this.name, this.size, this.rotated, this.trimmed, this.frame, |
+ this.spriteSourceSize, this.pivot) { |
+ } |
+ |
+ Texture textureFromRect(Rect rect, Point offset, bool rotated) { |
+ // TODO: Implement this |
+ return null; |
+ } |
+} |