texture property
The texture that the sprite will render to screen. Cannot be null.
my9Sprite.texture = myTexture;
Implementation
SpriteTexture get texture => _texture;
Implementation
set texture(SpriteTexture texture) {
_texture = texture;
_isDirty = true;
if (texture == null) {
_cachedPaint = new Paint();
} else {
Matrix4 matrix = new Matrix4.identity();
ImageShader shader = new ImageShader(texture.image,
TileMode.repeated, TileMode.repeated, matrix.storage);
_cachedPaint = new Paint()
..shader = shader;
}
}