A concrete renderer based on Qt4 for conversion of Symbology Enconding Mark elements to an image pattern. It considers basic marks defined on Symbology Enconding Specification: "square", "circle", "triangle", "star", "cross", and "x". More...
#include <WellKnownMarkRenderer.h>
Public Types | |
enum | MarkType { Square, Circle, Triangle, Star, Cross, X, Diamond, Ellipse, Semicircle, Pentagon, Hexagon, Octagon } |
This enum specifies mark types handle by this renderer. More... | |
Public Member Functions | |
void | getSupportedMarks (std::vector< std::string > &marks) const |
Method that informs the set of supported marks by a specific concrete mark renderer. More... | |
te::color::RGBAColor ** | render (const te::se::Mark *mark, std::size_t size) |
It generates the image pattern from the given Symbology Enconding Mark element. More... | |
WellKnownMarkRenderer () | |
Constructor. More... | |
~WellKnownMarkRenderer () | |
Destructor. More... | |
Protected Member Functions | |
Internal methods of Qt4 Mark Renderer. | |
Methods that manipulate Qt4 concepts like QPainter, QImage, QBrush, QPen, QPainterPath, etc. | |
void | buildMaps () |
Builds the internal auxiliary maps to map Symbology Enconding concepts to Qt. More... | |
void | buildPaths () |
Builds the pre-defined marks paths. More... | |
void | setup (QImage *img) |
Setups the internal QPainter and associates it with the given paint device (QImage). More... | |
void | end () |
Finalizes the internal QPainter resources. More... | |
void | draw (QImage *img, QPainterPath &path) |
Draw the given path on the the given image using the internal pen and brush. More... | |
Private Attributes | |
QBrush | m_brush |
The pen used to draw the mark patterns. More... | |
QPainterPath | m_circlePath |
Pre-defined path to circle mark. More... | |
QPainterPath | m_crossPath |
Pre-defined path to cross mark. More... | |
QPainterPath | m_diamondPath |
Pre-defined path to diamond mark. More... | |
QPainterPath | m_ellipsePath |
Pre-defined path to ellipse mark. More... | |
QPainterPath | m_hexagonPath |
Pre-defined path to hexagon mark. More... | |
QPainterPath | m_octagonPath |
Pre-defined path to octagon mark. More... | |
QPainter | m_painter |
The painter used to draw the mark patterns. More... | |
QPen | m_pen |
The pen used to draw the mark patterns. More... | |
QPainterPath | m_pentagonPath |
Pre-defined path to pentagon mark. More... | |
QPainterPath | m_semiCirclePath |
Pre-defined path to semicircle mark. More... | |
QPainterPath | m_squarePath |
Pre-defined path to square mark. More... | |
QPainterPath | m_starPath |
Pre-defined path to star mark. More... | |
QPainterPath | m_trianglePath |
Pre-defined path to triangle mark. More... | |
QPainterPath | m_xPath |
Pre-defined path to x mark. More... | |
Static Private Attributes | |
static std::map< std::string, MarkType > | sm_markMap |
A map that associates a well-known mark name to the correct mark type. More... | |
A concrete renderer based on Qt4 for conversion of Symbology Enconding Mark elements to an image pattern. It considers basic marks defined on Symbology Enconding Specification: "square", "circle", "triangle", "star", "cross", and "x".
Definition at line 53 of file WellKnownMarkRenderer.h.
This enum specifies mark types handle by this renderer.
Definition at line 62 of file WellKnownMarkRenderer.h.
te::qt::widgets::WellKnownMarkRenderer::WellKnownMarkRenderer | ( | ) |
Constructor.
te::qt::widgets::WellKnownMarkRenderer::~WellKnownMarkRenderer | ( | ) |
Destructor.
|
protected |
Builds the internal auxiliary maps to map Symbology Enconding concepts to Qt.
|
protected |
Builds the pre-defined marks paths.
|
protected |
Draw the given path on the the given image using the internal pen and brush.
img | The image where the path will be drawn. |
path | The path that will be drawn. |
|
protected |
Finalizes the internal QPainter resources.
|
virtual |
Method that informs the set of supported marks by a specific concrete mark renderer.
marks | A pre-created vector of string that will be filled with the supported marks names. |
Implements te::map::AbstractMarkRenderer.
|
virtual |
It generates the image pattern from the given Symbology Enconding Mark element.
mark | The Symbology Enconding Mark element that will be used to build the image pattern. |
size | The size of image pattern that will be generated. |
Implements te::map::AbstractMarkRenderer.
|
protected |
Setups the internal QPainter and associates it with the given paint device (QImage).
|
private |
The pen used to draw the mark patterns.
Definition at line 123 of file WellKnownMarkRenderer.h.
|
private |
Pre-defined path to circle mark.
Definition at line 126 of file WellKnownMarkRenderer.h.
|
private |
Pre-defined path to cross mark.
Definition at line 129 of file WellKnownMarkRenderer.h.
|
private |
Pre-defined path to diamond mark.
Definition at line 131 of file WellKnownMarkRenderer.h.
|
private |
Pre-defined path to ellipse mark.
Definition at line 132 of file WellKnownMarkRenderer.h.
|
private |
Pre-defined path to hexagon mark.
Definition at line 135 of file WellKnownMarkRenderer.h.
|
private |
Pre-defined path to octagon mark.
Definition at line 136 of file WellKnownMarkRenderer.h.
|
private |
The painter used to draw the mark patterns.
Definition at line 121 of file WellKnownMarkRenderer.h.
|
private |
The pen used to draw the mark patterns.
Definition at line 122 of file WellKnownMarkRenderer.h.
|
private |
Pre-defined path to pentagon mark.
Definition at line 134 of file WellKnownMarkRenderer.h.
|
private |
Pre-defined path to semicircle mark.
Definition at line 133 of file WellKnownMarkRenderer.h.
|
private |
Pre-defined path to square mark.
Definition at line 125 of file WellKnownMarkRenderer.h.
|
private |
Pre-defined path to star mark.
Definition at line 128 of file WellKnownMarkRenderer.h.
|
private |
Pre-defined path to triangle mark.
Definition at line 127 of file WellKnownMarkRenderer.h.
|
private |
Pre-defined path to x mark.
Definition at line 130 of file WellKnownMarkRenderer.h.
|
staticprivate |
A map that associates a well-known mark name to the correct mark type.
Definition at line 119 of file WellKnownMarkRenderer.h.