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>
|
enum | MarkType {
Square,
Circle,
Triangle,
Star,
Cross,
X,
Diamond,
Ellipse,
Semicircle,
Pentagon,
Hexagon,
Octagon
} |
| This enum specifies mark types handle by this renderer. More...
|
|
|
|
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...
|
|
|
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".
- See also
- AbstractMarkRenderer
Definition at line 53 of file WellKnownMarkRenderer.h.
◆ MarkType
This enum specifies mark types handle by this renderer.
Enumerator |
---|
Square | A square mark.
|
Circle | A circle mark.
|
Triangle | A triangle mark.
|
Star | A start mark.
|
Cross | A cross mark.
|
X | A x mark.
|
Diamond | A diamond mark.
|
Ellipse | A ellipse mark.
|
Semicircle | A semicircle mark.
|
Pentagon | A pentagon mark.
|
Hexagon | A hegaxon mark.
|
Octagon | A octagon mark.
|
Definition at line 62 of file WellKnownMarkRenderer.h.
◆ WellKnownMarkRenderer()
te::qt::widgets::WellKnownMarkRenderer::WellKnownMarkRenderer |
( |
| ) |
|
◆ ~WellKnownMarkRenderer()
te::qt::widgets::WellKnownMarkRenderer::~WellKnownMarkRenderer |
( |
| ) |
|
◆ buildMaps()
void te::qt::widgets::WellKnownMarkRenderer::buildMaps |
( |
| ) |
|
|
protected |
Builds the internal auxiliary maps to map Symbology Enconding concepts to Qt.
◆ buildPaths()
void te::qt::widgets::WellKnownMarkRenderer::buildPaths |
( |
| ) |
|
|
protected |
Builds the pre-defined marks paths.
◆ draw()
void te::qt::widgets::WellKnownMarkRenderer::draw |
( |
QImage * |
img, |
|
|
QPainterPath & |
path |
|
) |
| |
|
protected |
Draw the given path on the the given image using the internal pen and brush.
- Parameters
-
img | The image where the path will be drawn. |
path | The path that will be drawn. |
◆ end()
void te::qt::widgets::WellKnownMarkRenderer::end |
( |
| ) |
|
|
protected |
Finalizes the internal QPainter resources.
◆ getSupportedMarks()
void te::qt::widgets::WellKnownMarkRenderer::getSupportedMarks |
( |
std::vector< std::string > & |
marks | ) |
const |
|
virtual |
Method that informs the set of supported marks by a specific concrete mark renderer.
- Parameters
-
marks | A pre-created vector of string that will be filled with the supported marks names. |
Implements te::map::AbstractMarkRenderer.
◆ render()
It generates the image pattern from the given Symbology Enconding Mark element.
- Parameters
-
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. |
- Returns
- The RGBA image that represents the mark.
- Note
- The caller will take the ownership of the returned pointer.
Implements te::map::AbstractMarkRenderer.
◆ setup()
void te::qt::widgets::WellKnownMarkRenderer::setup |
( |
QImage * |
img | ) |
|
|
protected |
Setups the internal QPainter and associates it with the given paint device (QImage).
◆ m_brush
QBrush te::qt::widgets::WellKnownMarkRenderer::m_brush |
|
private |
◆ m_circlePath
QPainterPath te::qt::widgets::WellKnownMarkRenderer::m_circlePath |
|
private |
◆ m_crossPath
QPainterPath te::qt::widgets::WellKnownMarkRenderer::m_crossPath |
|
private |
◆ m_diamondPath
QPainterPath te::qt::widgets::WellKnownMarkRenderer::m_diamondPath |
|
private |
◆ m_ellipsePath
QPainterPath te::qt::widgets::WellKnownMarkRenderer::m_ellipsePath |
|
private |
◆ m_hexagonPath
QPainterPath te::qt::widgets::WellKnownMarkRenderer::m_hexagonPath |
|
private |
◆ m_octagonPath
QPainterPath te::qt::widgets::WellKnownMarkRenderer::m_octagonPath |
|
private |
◆ m_painter
QPainter te::qt::widgets::WellKnownMarkRenderer::m_painter |
|
private |
◆ m_pen
QPen te::qt::widgets::WellKnownMarkRenderer::m_pen |
|
private |
◆ m_pentagonPath
QPainterPath te::qt::widgets::WellKnownMarkRenderer::m_pentagonPath |
|
private |
◆ m_semiCirclePath
QPainterPath te::qt::widgets::WellKnownMarkRenderer::m_semiCirclePath |
|
private |
◆ m_squarePath
QPainterPath te::qt::widgets::WellKnownMarkRenderer::m_squarePath |
|
private |
◆ m_starPath
QPainterPath te::qt::widgets::WellKnownMarkRenderer::m_starPath |
|
private |
◆ m_trianglePath
QPainterPath te::qt::widgets::WellKnownMarkRenderer::m_trianglePath |
|
private |
◆ m_xPath
QPainterPath te::qt::widgets::WellKnownMarkRenderer::m_xPath |
|
private |
◆ sm_markMap
std::map<std::string, MarkType> te::qt::widgets::WellKnownMarkRenderer::sm_markMap |
|
staticprivate |
The documentation for this class was generated from the following file: