SpriteTexture constructor
SpriteTexture(
- Image image
Creates a new texture from an Image object.
var myTexture = new Texture(myImage);
Implementation
SpriteTexture(this.image)
: size = Size(image.width.toDouble(), image.height.toDouble()),
trimmed = false,
rotated = false,
frame = Rect.fromLTRB(
0.0, 0.0, image.width.toDouble(), image.height.toDouble()),
spriteSourceSize = Rect.fromLTRB(
0.0, 0.0, image.width.toDouble(), image.height.toDouble()),
pivot = const Offset(0.5, 0.5);