Texture.fromImage constructor
Texture.fromImage(})
Implementation
Texture.fromImage(
this.image, {
Vector2? position,
Vector2? size,
Vector2? trimOffset,
Vector2? trimSize,
}) {
this.position = position ?? Vector2.zero();
this.size = size ??
Vector2(
image.width.toDouble(),
image.height.toDouble(),
);
this.trimOffset = trimOffset ?? Vector2.zero();
this.trimSize = trimSize ??
size ??
Vector2(
image.width.toDouble(),
image.height.toDouble(),
);
}