![]() |
Mapper
0.9.0
API documentation
|
A Renderable is a graphical item with a simple shape and a single color. More...
#include <renderable.h>
Public Member Functions | |
Renderable (const Renderable &)=delete | |
Renderable (Renderable &&)=delete | |
virtual | ~Renderable () |
The destructor. More... | |
Renderable & | operator= (const Renderable &)=delete |
Renderable & | operator= (Renderable &&)=delete |
const QRectF & | getExtent () const |
Returns the extent (bounding box). More... | |
bool | intersects (const QRectF &rect) const |
Tests whether the renderable's extent intersects the given rect. More... | |
virtual PainterConfig | getPainterConfig (const QPainterPath *clip_path=nullptr) const =0 |
Returns the painter configuration information. More... | |
virtual void | render (QPainter &painter, const RenderConfig &config) const =0 |
Renders the renderable with the given painter and rendering configuration. More... | |
Protected Member Functions | |
Renderable (const MapColor *color) | |
The constructor for new renderables. More... | |
Protected Attributes | |
const int | color_priority |
The color priority is a major attribute and cannot be modified. More... | |
QRectF | extent |
The extent must be set by inheriting classes. More... | |
A Renderable is a graphical item with a simple shape and a single color.
This is the abstract base class. Inheriting classes must implement the abstract methods, and they must set the extent during construction.
|
inlineexplicitprotected |
The constructor for new renderables.
|
delete |
|
delete |
|
virtualdefault |
The destructor.
|
inline |
Returns the extent (bounding box).
|
pure virtual |
Returns the painter configuration information.
This configuration must be set when rendering this renderable.
Implemented in OpenOrienteering::TextFramingRenderable, OpenOrienteering::TextRenderable, OpenOrienteering::AreaRenderable, OpenOrienteering::LineRenderable, OpenOrienteering::CircleRenderable, and OpenOrienteering::DotRenderable.
Tests whether the renderable's extent intersects the given rect.
|
delete |
|
delete |
|
pure virtual |
Renders the renderable with the given painter and rendering configuration.
Implemented in OpenOrienteering::TextFramingRenderable, OpenOrienteering::TextRenderable, OpenOrienteering::AreaRenderable, OpenOrienteering::LineRenderable, OpenOrienteering::CircleRenderable, and OpenOrienteering::DotRenderable.
|
protected |
The color priority is a major attribute and cannot be modified.
|
protected |
The extent must be set by inheriting classes.