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

Public Member Functions

 AVectorDrawable (_< IImageFactory > factory)
 
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...
 
glm::ivec2 getSizeHint () override
 
bool isDpiDependent () const override
 
AImage rasterize (glm::ivec2 imageSize) override
 Converts possibly vector drawable to a raster image. More...
 

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 AVectorDrawable::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 AVectorDrawable::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.

◆ isDpiDependent()

bool AVectorDrawable::isDpiDependent ( ) const
overridevirtual
Returns
true if the size hint of this drawable needs to be multiplied by the DPI ratio

Reimplemented from IDrawable.

◆ rasterize()

AImage AVectorDrawable::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 AVectorDrawable:
Collaboration diagram for AVectorDrawable: