struct ImageSpriteInformation

Inherits: SpriteInformation

Information used for initializing or updating an image sprite.

Public

Constructors

ImageSpriteInformation

ImageSpriteInformation() = default

Fields

Anchor

Determines where in the provided bounds will the sprite be placed.

UvScale

Vector2 UvScale

Scale applied to UV width/height used for rendering the sprite.

UvOffset

Vector2 UvOffset

Offset applied to UV coordinates when rendering the sprite.

Image

HSpriteImage Image

Image to overlay on the sprite.

AnimationStartTime

float AnimationStartTime

Time (since application start) at which the sprite texture's 0th frame is played.

Used if the sprite texture has sprite sheet animation defined.

BorderLeft

u32 BorderLeft

Borders (in texels) that allow you to control how is the texture scaled.

If borders are 0 the texture will be scaled uniformly. If they are not null only the area inside the borders will be scaled and the outside are will remain the original size as in the texture. This allows you to implement "Scale9Grid" functionality.

BorderRight

u32 BorderRight

BorderTop

u32 BorderTop

BorderBottom

u32 BorderBottom

Size

Size2I Size

Size of the sprite in pixels.

Transparent

bool Transparent

Should the sprite be rendered with transparency.

Color

Color tint to apply to the sprite.