27 #include "../../../color/RGBAColor.h"
28 #include "../../../maptools/Utils.h"
29 #include "../../../se/Stroke.h"
30 #include "../../../se/SvgParameter.h"
34 #include <QtCore/QVector>
35 #include <QtGui/QBrush>
42 pen.setColor(Qt::transparent);
64 Qt::PenCapStyle capStyle = Qt::FlatCap;
67 pen.setCapStyle(capStyle);
79 pen.setJoinStyle(joinStyle);
88 std::vector<double> pattern;
91 pen.setDashPattern(QVector<qreal>::fromStdVector(pattern));
101 brush.setColor(Qt::transparent);
109 brush.setColor(qrgba);
const SvgParameter * getLineJoin() const
TEMAPEXPORT void GetColor(const te::se::Stroke *stroke, te::color::RGBAColor &color)
Gets the RGBA color from Stroke element.
A Fill specifies the pattern for filling an area geometry.
TEMAPEXPORT int GetInt(const te::se::ParameterValue *param)
Gets the parameter value as integer.
#define TE_SE_ROUND_CAP
It specifies the value "round" for stroke-linecap parameter.
#define TE_SE_ROUND_JOIN
It specifies the value "round" for stroke-linejoin parameter.
const SvgParameter * getWidth() const
void Config(QPen &pen, const te::se::Stroke *stroke)
It configs the given pen based on Symbology Enconding Stroke element.
void getRgba(int *r, int *g, int *b, int *a=0) const
It gets the color value.
const SvgParameter * getLineCap() const
Utility functions for MapTools module.
A Stroke specifies the appearance of a linear geometry.
const SvgParameter * getDashArray() const
TEMAPEXPORT void GetDashStyle(const std::string &dasharray, std::vector< double > &style)
Converts a dasharray pattern coded by a string to a vector of double.
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
TEMAPEXPORT std::string GetString(const te::se::ParameterValue *param)
Gets the parameter value as string.
#define TE_SE_DEFAULT_STROKE_BASIC_COLOR
It specifies the default color used by stroke basic (solid colors).
#define TE_SE_DEFAULT_FILL_BASIC_COLOR
It specifies the default color used by basic fill (solid colors).
#define TE_OPAQUE
For an RGBA color this is the value of the alpha-channel for totally opaque.
A SvgParameter refers to an SVG/CSS graphical-formatting parameter.
int getAlpha() const
It returns the alpha component color value (a value from 0 to 255).