|
Practical Tools for Simple Design
|
A class representing an image. More...
#include <Image.hpp>
Public Member Functions | |
| Image (const std::string &filepath, bool useAA=true) | |
| Constructor that takes a file path to the image. More... | |
| glm::vec2 | GetSize () const override |
| Retrieves the size of the image. More... | |
| void | SetImage (const std::string &filepath) |
| Sets the image to the specified file path. More... | |
| void | UseAntiAliasing (bool useAA) |
| Sets whether anti-aliasing (AA) should be enabled or disabled. More... | |
| void | Draw (const Core::Matrices &data) override |
| Draws the image with a given transform and z-index. More... | |
| virtual void | Draw (const Core::Matrices &data)=0 |
| virtual glm::vec2 | GetSize () const =0 |
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.
| Util::Image::Image | ( | const std::string & | filepath, |
| bool | useAA = true |
||
| ) |
Constructor that takes a file path to the image.
| filepath | The file path to the image. |
| useAA | Flag indicating whether anti-aliasing should be enabled (default is true). |
|
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. |
| void Util::Image::UseAntiAliasing | ( | bool | useAA | ) |
Sets whether anti-aliasing (AA) should be enabled or disabled.
| useAA | A boolean value indicating whether anti-aliasing should be enabled (true) or disabled (false). |