UTFWin::IStdDrawable class

An abstract class that has the methods that a standard drawable would require.

A standard drawable is capable of drawing different images depending on the window state, therefore it is suitable for any components that allow user interaction. A StdDrawable is also capable of detecting collisions based on a hit mask object.

Base classes

class UTFWinObject

Derived classes

class StdDrawable
The standard IDrawable for user interactive components.

Public static variables

static const uint32_t TYPE

Public functions

auto GetImage(StateIndices index) const -> Image* pure virtual
Gets the image for the specified state.
void SetImage(StateIndices index, Image* pImage) pure virtual
Sets the image for the specified state.
auto GetScaleType() const -> Scaling pure virtual
Specifies how the image should be stretched when the window changes size.
void SetScaleType(Scaling value) pure virtual
Specifies how the image should be stretched when the window changes size.
auto GetScaleArea() const -> const Math::Rectangle& pure virtual
Indicates the width of each non-stretched edge, as a proportion of image size (0 to 1).
void SetScaleArea(const Math::Rectangle& value) pure virtual
Indicates the width of each non-stretched edge, as a proportion of image size (0 to 1).
auto GetScaleFactor() const -> const Vector2& pure virtual
Gets the scaling factor for the non-stretched portions of the artwork.
void SetScaleFactor(Vector2& value) pure virtual
Sets the scaling factor for the non-stretched portions of the artwork.
auto GetHitMask() const -> Object* pure virtual
Gets the hit mask for this drawable.
void SetHitMask(Object* pHitMask) pure virtual
Sets the hit mask for this drawable.
auto GetHitFactor() const -> float pure virtual
void SetHitFactor(float value) pure virtual

Function documentation

Image* UTFWin::IStdDrawable::GetImage(StateIndices index) const pure virtual

Gets the image for the specified state.

Parameters
index The index for the state required.

void UTFWin::IStdDrawable::SetImage(StateIndices index, Image* pImage) pure virtual

Sets the image for the specified state.

Parameters
index The index for the state required.
pImage The image.

void UTFWin::IStdDrawable::SetScaleType(Scaling value) pure virtual

Specifies how the image should be stretched when the window changes size.

Parameters
value The new value, from the Scaling enumeration.

void UTFWin::IStdDrawable::SetScaleArea(const Math::Rectangle& value) pure virtual

Indicates the width of each non-stretched edge, as a proportion of image size (0 to 1).

Parameters
value The new value.

void UTFWin::IStdDrawable::SetScaleFactor(Vector2& value) pure virtual

Sets the scaling factor for the non-stretched portions of the artwork.

Parameters
value A Vector2 value containing the X and Y scale.

void UTFWin::IStdDrawable::SetHitMask(Object* pHitMask) pure virtual

Sets the hit mask for this drawable.

Parameters
pHitMask The new hit mask object.