class
IImageDrawableAn abstract class that has the methods that a drawable that renders an image would require.
Base classes
- class UTFWinObject
Derived classes
- class ImageDrawable
- A standard IDrawable that renders an image.
Public types
- enum Flags { kFlagFixedWidth = 1, kFlagFixedHeight = 2 }
Public static variables
Public static functions
- static auto AddImageWindow(const ResourceKey& imageName, float offsetX, float offsetY, IWindow* pParentWindow) -> IWindow*
- Creates an IWindow that will display the image with the name specified.
- static auto SetImageForWindow(IWindow* window, const ResourceKey& imageName) -> void
- If the given window has an IImageDrawable drawable, loads the 'imageName' image and sets it as the image of the drawable.
Public functions
- auto ToDrawable() -> IDrawable* pure virtual
- Get the IDrawable instance that represents this class.
- auto SetImage(Image* pImage) -> void pure virtual
- Sets the image to be shown.
- auto GetImage() const -> Image* pure virtual
- Gets the image to be shown.
- auto GetImageDrawableFlags() const -> int pure virtual
- Gets the flags used in this drawable.
- auto SetImageDrawableFlags(int flags) -> void pure virtual
- Sets the flags used in this drawable.
- auto SetImageDrawableFlag(int flag, bool bValue) -> void pure virtual
- Sets the specific drawable flag to the value given.
- auto SetTiling(ImageTiling tiling) -> void pure virtual
- Sets the tiling method that will be used in this drawable.
- auto GetTiling() const -> ImageTiling pure virtual
- Gets the tiling method that is being used in this drawable.
- auto SetScale(float fScale) -> void pure virtual
- Sets the scale of the image.
- auto GetScale() const -> float pure virtual
- Gets the scale of the image, as a float value.
- auto SetAlignmentHorizontal(AlignmentH alignment) -> void pure virtual
- Sets the horizontal alignment of the image.
- auto GetAlignmentHorizontal() const -> AlignmentH pure virtual
- Gets the horizontal alignment of the image.
- auto SetAlignmentVertical(AlignmentV alignment) -> void pure virtual
- Sets the vertical alignment of the image.
- auto GetAlignmentVertical() const -> AlignmentV pure virtual
- Gets the vertical alignment of the image.
Enum documentation
enum UTFWin:: IImageDrawable:: Flags
Enumerators | |
---|---|
kFlagFixedWidth |
Preserves the original width of the image. |
kFlagFixedHeight |
Preserves the original height of the image. |
Function documentation
static IWindow* UTFWin:: IImageDrawable:: AddImageWindow(const ResourceKey& imageName,
float offsetX,
float offsetY,
IWindow* pParentWindow)
Creates an IWindow that will display the image with the name specified.
Parameters | |
---|---|
imageName | The ResourceKey of the image to display. |
offsetX | The X coordinate of the newly generated window, relative to its parent. |
offsetY | The Y coordinate of the newly generated window, relative to its parent. |
pParentWindow | The IWindow that will be the parent of the created window. |
Returns | The newly created window. |
static void UTFWin:: IImageDrawable:: SetImageForWindow(IWindow* window,
const ResourceKey& imageName)
If the given window has an IImageDrawable drawable, loads the 'imageName' image and sets it as the image of the drawable.
Parameters | |
---|---|
window | |
imageName |
int UTFWin:: IImageDrawable:: GetImageDrawableFlags() const pure virtual
Gets the flags used in this drawable.
The flags are the AbstractImageDrawable::kFlag... values.
void UTFWin:: IImageDrawable:: SetImageDrawableFlags(int flags) pure virtual
Sets the flags used in this drawable.
Parameters | |
---|---|
flags | The new flags value. |
The flags are the AbstractImageDrawable::kFlag... values.
void UTFWin:: IImageDrawable:: SetImageDrawableFlag(int flag,
bool bValue) pure virtual
Sets the specific drawable flag to the value given.
Parameters | |
---|---|
flag | The flag to set. |
bValue | The new bool value of the flag. |
The possible flags are the AbstractImageDrawable::kFlag... values.
void UTFWin:: IImageDrawable:: SetTiling(ImageTiling tiling) pure virtual
Sets the tiling method that will be used in this drawable.
Parameters | |
---|---|
tiling | ImageTiling The tiling to use, in the ImageTiling enum. |
void UTFWin:: IImageDrawable:: SetAlignmentHorizontal(AlignmentH alignment) pure virtual
Sets the horizontal alignment of the image.
Parameters | |
---|---|
alignment | The new alignment value, in the enum AlignmentH. |
void UTFWin:: IImageDrawable:: SetAlignmentVertical(AlignmentV alignment) pure virtual
Sets the vertical alignment of the image.
Parameters | |
---|---|
alignment | The new alignment value, in the enum AlignmentV. |