AUI Framework  master
Cross-platform module-based framework for developing C++20 desktop applications
AImageDrawable Class Reference

Public Member Functions

 AImageDrawable (_< AImage > image)
 
void draw (IRenderer &render, const IDrawable::Params &params) override
 Called when the image needs to be displayed. It is assumed that the renderer is already set to the desired state (coordinates, color, etc.) More...
 
AImage rasterize (glm::ivec2 imageSize) override
 Converts possibly vector drawable to a raster image. More...
 
glm::ivec2 getSizeHint () override
 
- Public Member Functions inherited from IDrawable
virtual bool isDpiDependent () const
 

Additional Inherited Members

- Static Public Member Functions inherited from IDrawable
static API_AUI_VIEWS _< IDrawablefromUrl (const AUrl &url) noexcept
 Creates a drawable from an url. More...
 

Member Function Documentation

◆ draw()

void AImageDrawable::draw ( IRenderer render,
const IDrawable::Params params 
)
overridevirtual

Called when the image needs to be displayed. It is assumed that the renderer is already set to the desired state (coordinates, color, etc.)

Implements IDrawable.

◆ getSizeHint()

glm::ivec2 AImageDrawable::getSizeHint ( )
overridevirtual
Returns
Size of the stored image. Can be ignored by the renderer. If the size is unknown, it can be {0, 0}

Implements IDrawable.

◆ rasterize()

AImage AImageDrawable::rasterize ( glm::ivec2  imageSize)
overridevirtual

Converts possibly vector drawable to a raster image.

Parameters
imageSizeimage size
Returns
rasterized image

TODO Unimplemented for all drawables except raster image and svg

Reimplemented from IDrawable.


The documentation for this class was generated from the following files:
Inheritance diagram for AImageDrawable:
Collaboration diagram for AImageDrawable: