OLD | NEW |
---|---|
(Empty) | |
1 part of sprites; | |
2 | |
3 class Texture { | |
4 final Image image; | |
5 final Size size; | |
6 String name; | |
7 final bool rotated; | |
8 final bool trimmed; | |
9 | |
10 Rect frame; | |
11 Rect spriteSourceSize; | |
12 | |
13 Point pivot; | |
14 | |
15 Texture(Image image) : | |
16 size = new Size(image.width.toDouble(), image.height.toDouble()), | |
17 image = image, | |
18 trimmed = false, | |
19 rotated = false, | |
20 frame = new Rect.fromLTRB(0.0, 0.0, image.width.toDouble(), image.height.toD ouble()), | |
eseidel
2015/06/23 23:22:31
fromPointAndSize ? I guess Image doesn't have a s
| |
21 spriteSourceSize = new Rect.fromLTRB(0.0, 0.0, image.width.toDouble(), image .height.toDouble()), | |
22 pivot = new Point(0.5, 0.5); | |
23 | |
24 | |
25 Texture._fromSpriteFrame(this.image, this.name, this.size, this.rotated, this. trimmed, this.frame, | |
26 this.spriteSourceSize, this.pivot) { | |
27 } | |
28 | |
29 Texture textureFromRect(Rect rect, Point offset, bool rotated) { | |
30 // TODO: Implement this | |
31 return null; | |
32 } | |
33 } | |
OLD | NEW |