Image
Inherited: None
Description
The Image class represents an image or sprite that can be rendered and displayed on the screen within a graphical user interface (GUI). It is used to incorporate visual elements into the interface, such as icons, backgrounds, or illustrations, by loading and rendering image files.
Public Methods
color () const |
|
int |
drawMode () const |
std::string |
item () const |
Material * |
material () const |
void |
setColor (const Vector4 color) |
void |
setDrawMode (int mode) |
void |
setItem (const std::string item) |
void |
setMaterial (Material * material) |
void |
setSprite (Sprite * sheet) |
void |
setTexture (Texture * image) |
Sprite * |
sprite () const |
Static Methods
None
Methods Description
Vector4 Image::color () const
Returns the color of the image to be drawn.
See also setColor().
int Image::drawMode () const
Returns a draw mode for the image. Please check Image::DrawMode for more details.
See also setDrawMode().
std::string Image::item () const
Returns the current item name of sprite from the sprite sheet.
See also setItem().
Material * Image::material () const
Returns an instantiated Material assigned to Image.
See also setMaterial().
void Image::setColor (Vector4 color)
Changes the color of the image to be drawn.
See also *color*().
void Image::setDrawMode (int mode)
Sets a draw mode for the image. Please check Image::DrawMode for more details.
See also drawMode().
void Image::setItem (std::string item)
Sets the current sub item name of sprite from the sprite sheet.
See also *item*().
void Image::setMaterial (Material * material)
Creates a new instance of material and assigns it.
See also *material*().
void Image::setSprite (Sprite * sheet)
Replaces the current sprite sheet with a new one.
See also sprite().
void Image::setTexture (Texture * image)
Replaces the current image with a new one.
Sprite * Image::sprite () const
Returns the sprite assigned to the Image.
See also setSprite().