Mapper  0.9.0
API documentation
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OpenOrienteering::TextRenderable Class Reference

Renderable for displaying text. More...

#include <renderable_implementation.h>

Inheritance diagram for OpenOrienteering::TextRenderable:
Inheritance graph
[legend]
Collaboration diagram for OpenOrienteering::TextRenderable:
Collaboration graph
[legend]

Public Member Functions

 TextRenderable (const TextSymbol *symbol, const TextObject *text_object, const MapColor *color, double anchor_x, double anchor_y)
 
PainterConfig getPainterConfig (const QPainterPath *clip_path=nullptr) const override
 Returns the painter configuration information. More...
 
void render (QPainter &painter, const RenderConfig &config) const override
 Renders the renderable with the given painter and rendering configuration. More...
 
- Public Member Functions inherited from OpenOrienteering::Renderable
 Renderable (const Renderable &)=delete
 
 Renderable (Renderable &&)=delete
 
virtual ~Renderable ()
 The destructor. More...
 
Renderableoperator= (const Renderable &)=delete
 
Renderableoperator= (Renderable &&)=delete
 
const QRectFgetExtent () const
 Returns the extent (bounding box). More...
 
bool intersects (const QRectF &rect) const
 Tests whether the renderable's extent intersects the given rect. More...
 

Protected Member Functions

void renderCommon (QPainter &painter, const RenderConfig &config) const
 
- Protected Member Functions inherited from OpenOrienteering::Renderable
 Renderable (const MapColor *color)
 The constructor for new renderables. More...
 

Protected Attributes

QPainterPath path
 
qreal anchor_x
 
qreal anchor_y
 
qreal rotation
 
qreal scale_factor
 
- Protected Attributes inherited from OpenOrienteering::Renderable
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...
 

Detailed Description

Renderable for displaying text.

Constructor & Destructor Documentation

◆ TextRenderable()

OpenOrienteering::TextRenderable::TextRenderable ( const TextSymbol symbol,
const TextObject text_object,
const MapColor color,
double  anchor_x,
double  anchor_y 
)

Member Function Documentation

◆ getPainterConfig()

PainterConfig OpenOrienteering::TextRenderable::getPainterConfig ( const QPainterPath clip_path = nullptr) const
overridevirtual

Returns the painter configuration information.

This configuration must be set when rendering this renderable.

Implements OpenOrienteering::Renderable.

Reimplemented in OpenOrienteering::TextFramingRenderable.

◆ render()

void OpenOrienteering::TextRenderable::render ( QPainter painter,
const RenderConfig config 
) const
overridevirtual

Renders the renderable with the given painter and rendering configuration.

Implements OpenOrienteering::Renderable.

Reimplemented in OpenOrienteering::TextFramingRenderable.

◆ renderCommon()

void OpenOrienteering::TextRenderable::renderCommon ( QPainter painter,
const RenderConfig config 
) const
protected

Member Data Documentation

◆ anchor_x

qreal OpenOrienteering::TextRenderable::anchor_x
protected

◆ anchor_y

qreal OpenOrienteering::TextRenderable::anchor_y
protected

◆ path

QPainterPath OpenOrienteering::TextRenderable::path
protected

◆ rotation

qreal OpenOrienteering::TextRenderable::rotation
protected

◆ scale_factor

qreal OpenOrienteering::TextRenderable::scale_factor
protected

The documentation for this class was generated from the following files: