![]() |
Mapper
0.9.0
API documentation
|
PainterConfig contains painter configuration information. More...
#include <renderable.h>

Public Types | |
| enum | PainterMode { BrushOnly = 0, PenOnly = 1, Reserved = -1 } |
Public Member Functions | |
| bool | activate (QPainter *painter, const QPainterPath *¤t_clip, const RenderConfig &config, const QColor &color, const QPainterPath &initial_clip) const |
| Activates the configuration on the given painter. More... | |
Public Attributes | |
| const int | color_priority |
| The color priority which determines rendering order. More... | |
| const PainterMode | mode |
| The mode of painting. More... | |
| const qreal | pen_width |
| The width of the pen. More... | |
| const QPainterPath * | clip_path |
| A clip_path which may be shared by several Renderables. More... | |
Friends | |
| bool | operator== (const PainterConfig &lhs, const PainterConfig &rhs) |
| Returns true if the configurations are equal. More... | |
| bool | operator< (const PainterConfig &lhs, const PainterConfig &rhs) |
| Defines an order over values which are not equal. More... | |
PainterConfig contains painter configuration information.
When painting a renderable item, the QPainter shall be configured according to this information.
A PainterConfig is an immutable values, constructed with initializer lists.
| bool OpenOrienteering::PainterConfig::activate | ( | QPainter * | painter, |
| const QPainterPath *& | current_clip, | ||
| const RenderConfig & | config, | ||
| const QColor & | color, | ||
| const QPainterPath & | initial_clip | ||
| ) | const |
Activates the configuration on the given painter.
If this method returns false, the corresponding renderables shall not be drawn.
| painter | The painter to be configured. |
| current_clip | A pointer which will be set to the address of the current clip, in order to avoid switching the clip area unnecessarily. |
| config | The rendering configurations. |
| color | The QColor to be used for the pen or brush. |
| initial_clip | The clip which was set initially for this painter. |
|
friend |
Defines an order over values which are not equal.
|
friend |
Returns true if the configurations are equal.
| const QPainterPath* OpenOrienteering::PainterConfig::clip_path |
A clip_path which may be shared by several Renderables.
| const int OpenOrienteering::PainterConfig::color_priority |
The color priority which determines rendering order.
| const PainterMode OpenOrienteering::PainterConfig::mode |
The mode of painting.
| const qreal OpenOrienteering::PainterConfig::pen_width |
The width of the pen.
1.8.13