IDrawable#
An abstract image that determines itself how it is displayed. Essentially an abstraction from vector and raster graphics.
Header: | #include <AUI/Image/IDrawable.h> |
CMake: | aui_link(my_target PUBLIC aui::views) |
Public Types#
Params#
struct IDrawable::Params
Empty structure.
Public Methods#
draw#
virtual void IDrawable::draw(IRenderer& render, const IDrawable::Params& params)
Called when the image needs to be displayed. It is assumed that the renderer is already set to the desired state (coordinates, color, etc.)
getSizeHint#
- Returns
- Size of the stored image. Can be ignored by the renderer. If the size is unknown, it can be {0, 0}
isDpiDependent#
- Returns
- true if the size hint of this drawable needs to be multiplied by the DPI ratio
rasterize#
virtual AImage IDrawable::rasterize(glm::ivec2 imageSize)
Converts possibly vector drawable to a raster image.
- Arguments
imageSize
image size- Returns
- rasterized image
TODO Unimplemented for all drawables except raster image and svg