GSubTexture class
Represents a sub-texture or a sub-region of a texture.
Constructors
Properties
- actualHeight ↔ double?
-
The actual height of the texture after applying the scale.
getter/setter pairinherited
- actualWidth ↔ double?
-
The actual width of the texture after applying the scale.
getter/setter pairinherited
- color ↔ Color?
-
The color of the texture when the texture is a plain color.
getter/setter pairinherited
- disposed → bool
-
Indicates whether this GTexture instance has been disposed or not. Once
disposed, the root reference and all other properties are set to null,
and further method calls to this instance may result in errors or
unexpected behavior.
no setterinherited
- frame ↔ GRect?
-
The region of the texture to render.
getter/setter pairinherited
- frameHeight → double
-
The height of the frame of the texture.
no setterinherited
- frameWidth → double
-
The width of the frame of the texture.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Returns the height of this sub-texture.
no setteroverride
- nativeHeight → double
-
Returns the native height of this sub-texture, taking into account its
scale.
no setteroverride
- nativeWidth → double
-
Returns the native width of this sub-texture, taking into account its
scale.
no setteroverride
- ownsParent → bool?
-
Returns whether this sub-texture owns its parent texture, meaning whether
this sub-texture is responsible for disposing its parent texture.
no setter
- parent → GTexture?
-
Returns the parent texture of this sub-texture.
no setter
- pivotX ↔ double?
-
The horizontal coordinate of the texture's pivot point.
getter/setter pairinherited
- pivotY ↔ double?
-
The vertical coordinate of the texture's pivot point.
getter/setter pairinherited
- region → GRect?
-
Returns the region of this sub-texture within its parent texture.
no setter
- root ↔ Image?
-
Returns the root image of the parent texture of this sub-texture.
getter/setter pairinherited-setteroverride-getter
- rotated → bool?
-
Returns whether this sub-texture is rotated within its parent texture.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale ↔ double?
-
Returns the scale of this sub-texture, relative to its parent texture.
getter/setter pairinherited-setteroverride-getter
- scale9Grid ↔ GRect?
-
The region of the texture that should be scaled when rendering.
getter/setter pairinherited
- scale9GridDest ↔ GRect?
-
The destination region of the texture to be scaled when rendering.
getter/setter pairinherited
- sourceRect ↔ GRect?
-
The source rectangle of the texture.
getter/setter pairinherited
- width → double?
-
Returns the width of this sub-texture.
no setteroverride
Methods
-
$setTo(
GTexture parent, {GRect? region, bool ownsParent = false, GRect? frame, required bool rotated, double scaleModifier = 1}) → void - (Internal usage)
-
copyFrom(
GTexture other) → void -
Copies the properties of another GTexture to this one.
inherited
-
dispose(
) → void -
Disposes the sub-texture, and also disposes the parent texture if
ownsParent
was set to true.override -
getBounds(
) → GRect? -
Gets the bounds of the texture.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
render(
Canvas? canvas, [Paint? paint]) → void -
(Internal usage)
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited