|
Practical Tools for Simple Design
|
A class representing an image. More...
#include <Image.hpp>
Public Member Functions | |
| Image (const std::string &filepath) | |
| Constructor that takes a file path to the image. | |
| glm::vec2 | GetSize () const override |
| Retrieves the size of the image. | |
| void | SetImage (const std::string &filepath) |
| Sets the image to the specified file path. | |
| void | Draw (const Core::Matrices &data) override |
| Draws the image with a given transform and z-index. | |
A class representing an image.
This class encapsulates the properties and behaviors of an image. It includes properties such as texture and surface. It also includes behaviors such as drawing the image.
|
explicit |
Constructor that takes a file path to the image.
| filepath | The file path to the image. |
|
overridevirtual |
Draws the image with a given transform and z-index.
This function draws the image at the specified z-index and applies the given transform.
| transform | The transform to apply to the image. |
| zIndex | The z-index at which to draw the image. |
Implements Core::Drawable.
|
inlineoverridevirtual |
Retrieves the size of the image.
This function returns the size of the image.
Implements Core::Drawable.
| void Util::Image::SetImage | ( | const std::string & | filepath | ) |
Sets the image to the specified file path.
This function sets the image to the specified file path.
| filepath | The file path to the image. |