TexturePackerSprite class
A Sprite
extracted from a texture packer file.
Constructors
- TexturePackerSprite(Region region)
-
A
Sprite
extracted from a texture packer file.
Properties
- angle → double
-
The degrees field (angle) represented as radians.
no setter
- degrees → int
-
The degrees the region has been rotated, counter clockwise between 0 and
359. Most atlas region handling deals only with 0 or 90 degree rotation
(enough to handle rectangles).
More advanced texture packing may support other rotations (eg, for tightly
packing polygons).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- image ↔ Image
-
getter/setter pairinherited
- index → int
-
The number at the end of the original image file name, or -1 if none.
final
- name → String
-
The name of the original image file, without the file's extension.
If the name ends with an underscore followed by only numbers, that part is
excluded: underscores denote special instructions to the texture packer.
final
- offsetX → double
-
The offset from the left of the original image to the left of the packed
image, after whitespace was removed for packing.
final
- offsetY → double
-
The offset from the bottom of the original image to the bottom of the
packed image, after whitespace was removed for packing.
final
- originalHeight → double
-
The height of the image, before whitespace was removed for packing.
final
- originalSize → Vector2
-
no setterinherited
- originalWidth → double
-
The width of the image, before whitespace was removed and rotation was
applied for packing.
final
- packedHeight → double
-
The height of the image, after whitespace was removed for packing.
final
- packedWidth → double
-
The width of the image, after whitespace was removed for packing.
final
- paint ↔ Paint
-
getter/setter pairinherited
- rotate → bool
-
If true, the region has been rotated 90 degrees counter clockwise.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- src ↔ Rect
-
getter/setter pairinherited
- srcPosition ↔ Vector2
-
getter/setter pairinherited
- srcSize ↔ Vector2
-
getter/setter pairinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
render(
Canvas canvas, {Vector2? position, Vector2? size, Anchor anchor = Anchor.topLeft, Paint? overridePaint}) → void -
Renders this sprite onto the
canvas
. -
renderRect(
Canvas canvas, Rect rect, {Paint? overridePaint}) → void -
Same as render, but takes both the position and the size as a single
Rect.
inherited
-
toImage(
) → Future< Image> -
Return a new
Image
based on the src of the Sprite.inherited -
toImageSync(
) → Image -
Return a new Image based on the src of the Sprite.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited