An abstract image that determines itself how it is displayed. Essentially an abstraction from vector and raster graphics.
More...
An abstract image that determines itself how it is displayed. Essentially an abstraction from vector and raster graphics.
|
virtual AImage | rasterize (glm::ivec2 imageSize) |
| Converts possibly vector drawable to a raster image. More...
|
|
virtual void | draw (IRenderer &render, const IDrawable::Params ¶ms)=0 |
| 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...
|
|
virtual glm::ivec2 | getSizeHint ()=0 |
|
virtual bool | isDpiDependent () const |
|
|
class | AImageLoaderRegistry |
|
class | ::Cache< IDrawable, Cache, AUrl > |
|
◆ draw()
◆ fromUrl()
Creates a drawable from an url.
- Parameters
-
url | url to create a drawable from |
- Returns
- drawable instance or null
If some kind of error occurs during loading the drawable, a log entry [Drawable] is outputted with detailed description of an error. The reason is we don't want to crash our application if we didn't loaded some graphics, which is usually pretty optional stuff. The user can still do his job with the application without fancy images.
◆ getSizeHint()
virtual glm::ivec2 IDrawable::getSizeHint |
( |
| ) |
|
|
pure virtual |
◆ isDpiDependent()
virtual bool IDrawable::isDpiDependent |
( |
| ) |
const |
|
inlinevirtual |
- Returns
- true if the size hint of this drawable needs to be multiplied by the DPI ratio
Reimplemented in AVectorDrawable.
◆ rasterize()
AImage IDrawable::rasterize |
( |
glm::ivec2 |
imageSize | ) |
|
|
virtual |
Converts possibly vector drawable to a raster image.
- Parameters
-
- Returns
- rasterized image
TODO Unimplemented for all drawables except raster image and svg
Reimplemented in AVectorDrawable, and AImageDrawable.
#include <AUI/Image/IDrawable.h>
The documentation for this class was generated from the following files:
- aui.views/src/AUI/Image/IDrawable.h
- aui.views/src/AUI/Image/IDrawable.cpp