A Stroke specifies the appearance of a linear geometry. More...
#include <Stroke.h>
Public Member Functions | |
| Stroke * | clone () const |
| It creates a new copy of this object. More... | |
Initializer Methods | |
Methods related to instantiation and destruction. | |
| Stroke () | |
| It initializes a new Stroke. More... | |
| ~Stroke () | |
| Destructor. More... | |
Accessor methods | |
Methods used to get or set properties. | |
| void | setGraphicFill (Graphic *fill) |
| Sets the GraphicFill element to this Stroke. GraphicFill defines that the pixels of the line will be drawn repeating an area-fill pattern. More... | |
| const Graphic * | getGraphicFill () const |
| Gets the GraphicFill element associate to this Stroke. More... | |
| void | setGraphicStroke (GraphicStroke *stroke) |
| Sets the GraphicStroke element to this Stroke. GraphicStroke defines that a repeated linear graphic is plotted linearly and has its graphic bent around the curves of the line string. More... | |
| const GraphicStroke * | getGraphicStroke () const |
| Gets the GraphicStroke element associate to this Stroke. More... | |
| void | add (SvgParameter *p) |
| Add a SvgParameter to this Stroke. More... | |
| void | setColor (const std::string &color) |
| void | setOpacity (const std::string &opacity) |
| void | setWidth (const std::string &width) |
| void | setLineJoin (const std::string &join) |
| void | setLineCap (const std::string &cap) |
| void | setDashArray (const std::string &dasharray) |
| void | setDashOffset (const std::string &offset) |
| const SvgParameter * | getColor () const |
| const SvgParameter * | getOpacity () const |
| const SvgParameter * | getWidth () const |
| const SvgParameter * | getLineJoin () const |
| const SvgParameter * | getLineCap () const |
| const SvgParameter * | getDashArray () const |
| const SvgParameter * | setDashOffset () const |
Private Member Functions | |
| const SvgParameter * | getParameter (const std::string &name) const |
| void | setParameter (const std::string &name, const std::string &value) |
Private Attributes | |
| Graphic * | m_fill |
| The GraphicFill both indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic. (Optional) More... | |
| GraphicStroke * | m_stroke |
| The GraphicStroke both indicates that a repeated-linear-graphic stroke type will be used. (Optional) More... | |
| std::map< std::string, SvgParameter * > | m_svgParams |
| If neither a GraphicFill nor GraphicStroke is given, then the line Symbolizer will render a solid color. (Optional) More... | |
Static Private Attributes | |
| static const std::string | sm_dasharray = "stroke-dasharray" |
| SVG/CSS "stroke-dasharray" parameter. More... | |
| static const std::string | sm_dashoffset = "stroke-dashoffset" |
| SVG/CSS "stroke-dashoffset" parameter. More... | |
| static const std::string | sm_linecap = "stroke-linecap" |
| SVG/CSS "stroke-linecap" parameter. More... | |
| static const std::string | sm_linejoin = "stroke-linejoin" |
| SVG/CSS "stroke-linejoin" parameter. More... | |
| static const std::string | sm_opacity = "stroke-opacity" |
| SVG/CSS "stroke-opacity parameter. More... | |
| static const std::string | sm_stroke = "stroke" |
| SVG/CSS "stroke" parameter. More... | |
| static const std::string | sm_width = "stroke-width" |
| SVG/CSS "stroke-width" parameter. More... | |
A Stroke specifies the appearance of a linear geometry.
It is defined in parallel with SVG strokes. There are three basic types of strokes:
If neither a GraphicFill nor GraphicStroke element is given, then the line Symbolizer will render a solid color.
| te::se::Stroke::Stroke | ( | ) |
| te::se::Stroke::~Stroke | ( | ) |
Destructor.
Definition at line 50 of file Stroke.cpp.
References te::common::FreeContents(), m_fill, m_stroke, and m_svgParams.
| void te::se::Stroke::add | ( | SvgParameter * | p | ) |
Add a SvgParameter to this Stroke.
Definition at line 79 of file Stroke.cpp.
References te::se::SvgParameter::getName(), and m_svgParams.
Referenced by clone().
| te::se::Stroke * te::se::Stroke::clone | ( | ) | const |
It creates a new copy of this object.
Definition at line 158 of file Stroke.cpp.
References add(), te::se::GraphicStroke::clone(), te::se::Graphic::clone(), getGraphicFill(), getGraphicStroke(), m_svgParams, setGraphicFill(), setGraphicStroke(), and Stroke().
Referenced by te::se::Mark::clone(), te::qt::widgets::ChartConfigurer::config(), te::qt::widgets::BasicStrokePropertyItem::getStroke(), te::qt::widgets::BasicStrokeWidget::getStroke(), te::se::LineSymbolizer::LineSymbolizer(), te::se::PolygonSymbolizer::PolygonSymbolizer(), te::qt::widgets::BasicStrokePropertyItem::setStroke(), and te::qt::widgets::BasicStrokeWidget::setStroke().
| const te::se::SvgParameter * te::se::Stroke::getColor | ( | ) | const |
Definition at line 123 of file Stroke.cpp.
References getParameter(), and sm_stroke.
Referenced by te::se::GetColor(), and te::se::serialize::Save().
| const te::se::SvgParameter * te::se::Stroke::getDashArray | ( | ) | const |
Definition at line 148 of file Stroke.cpp.
References getParameter(), and sm_dasharray.
Referenced by te::qt::widgets::Config(), te::map::CanvasConfigurer::config(), te::se::serialize::Save(), te::qt::widgets::BasicStrokePropertyItem::updateUi(), and te::qt::widgets::BasicStrokeWidget::updateUi().
| const te::se::Graphic * te::se::Stroke::getGraphicFill | ( | ) | const |
Gets the GraphicFill element associate to this Stroke.
Definition at line 63 of file Stroke.cpp.
References m_fill.
Referenced by clone(), te::map::CanvasConfigurer::config(), and te::se::serialize::Save().
| const te::se::GraphicStroke * te::se::Stroke::getGraphicStroke | ( | ) | const |
Gets the GraphicStroke element associate to this Stroke.
Definition at line 74 of file Stroke.cpp.
References m_stroke.
Referenced by clone(), and te::se::serialize::Save().
| const te::se::SvgParameter * te::se::Stroke::getLineCap | ( | ) | const |
Definition at line 143 of file Stroke.cpp.
References getParameter(), and sm_linecap.
Referenced by te::qt::widgets::Config(), te::map::CanvasConfigurer::config(), te::se::serialize::Save(), te::qt::widgets::BasicStrokePropertyItem::updateUi(), and te::qt::widgets::BasicStrokeWidget::updateUi().
| const te::se::SvgParameter * te::se::Stroke::getLineJoin | ( | ) | const |
Definition at line 138 of file Stroke.cpp.
References getParameter(), and sm_linejoin.
Referenced by te::qt::widgets::Config(), te::map::CanvasConfigurer::config(), te::se::serialize::Save(), te::qt::widgets::BasicStrokePropertyItem::updateUi(), and te::qt::widgets::BasicStrokeWidget::updateUi().
| const te::se::SvgParameter * te::se::Stroke::getOpacity | ( | ) | const |
Definition at line 128 of file Stroke.cpp.
References getParameter(), and sm_opacity.
Referenced by te::se::GetColor(), te::se::serialize::Save(), and te::qt::widgets::BasicStrokePropertyItem::updateUi().
|
private |
Definition at line 185 of file Stroke.cpp.
References m_svgParams.
Referenced by getColor(), getDashArray(), getLineCap(), getLineJoin(), getOpacity(), getWidth(), and setDashOffset().
| const te::se::SvgParameter * te::se::Stroke::getWidth | ( | ) | const |
Definition at line 133 of file Stroke.cpp.
References getParameter(), and sm_width.
Referenced by te::qt::widgets::Config(), te::map::CanvasConfigurer::config(), te::se::serialize::Save(), te::qt::widgets::BasicStrokePropertyItem::updateUi(), and te::qt::widgets::BasicStrokeWidget::updateUi().
| void te::se::Stroke::setColor | ( | const std::string & | color | ) |
Definition at line 88 of file Stroke.cpp.
References setParameter(), and sm_stroke.
Referenced by te::se::CreateStroke(), te::qt::widgets::BasicStrokeWidget::onColorChanged(), and te::qt::widgets::BasicStrokePropertyItem::valueChanged().
| void te::se::Stroke::setDashArray | ( | const std::string & | dasharray | ) |
Definition at line 113 of file Stroke.cpp.
References setParameter(), and sm_dasharray.
Referenced by te::se::CreateStroke(), te::qt::widgets::BasicStrokeWidget::onStrokeDashComboBoxCurrentIndexChanged(), and te::qt::widgets::BasicStrokePropertyItem::valueChanged().
| void te::se::Stroke::setDashOffset | ( | const std::string & | offset | ) |
Definition at line 118 of file Stroke.cpp.
References setParameter(), and sm_dashoffset.
Referenced by te::se::serialize::Save().
| const te::se::SvgParameter * te::se::Stroke::setDashOffset | ( | ) | const |
Definition at line 153 of file Stroke.cpp.
References getParameter(), and sm_dashoffset.
| void te::se::Stroke::setGraphicFill | ( | Graphic * | fill | ) |
Sets the GraphicFill element to this Stroke. GraphicFill defines that the pixels of the line will be drawn repeating an area-fill pattern.
Definition at line 57 of file Stroke.cpp.
References m_fill.
Referenced by clone(), and te::se::CreateStroke().
| void te::se::Stroke::setGraphicStroke | ( | GraphicStroke * | stroke | ) |
Sets the GraphicStroke element to this Stroke. GraphicStroke defines that a repeated linear graphic is plotted linearly and has its graphic bent around the curves of the line string.
Definition at line 68 of file Stroke.cpp.
References m_stroke.
Referenced by clone().
| void te::se::Stroke::setLineCap | ( | const std::string & | cap | ) |
Definition at line 108 of file Stroke.cpp.
References setParameter(), and sm_linecap.
Referenced by te::se::CreateStroke(), te::qt::widgets::BasicStrokeWidget::onStrokeCapStyleChanged(), and te::qt::widgets::BasicStrokePropertyItem::valueChanged().
| void te::se::Stroke::setLineJoin | ( | const std::string & | join | ) |
Definition at line 103 of file Stroke.cpp.
References setParameter(), and sm_linejoin.
Referenced by te::se::CreateStroke(), te::qt::widgets::BasicStrokeWidget::onStrokeJoinStyleChanged(), and te::qt::widgets::BasicStrokePropertyItem::valueChanged().
| void te::se::Stroke::setOpacity | ( | const std::string & | opacity | ) |
Definition at line 93 of file Stroke.cpp.
References setParameter(), and sm_opacity.
Referenced by te::se::CreateStroke(), te::qt::widgets::BasicStrokeWidget::onStrokeOpacitySliderValueChanged(), te::qt::widgets::HistogramChart::setData(), and te::qt::widgets::BasicStrokePropertyItem::valueChanged().
|
private |
Definition at line 177 of file Stroke.cpp.
References m_svgParams.
Referenced by setColor(), setDashArray(), setDashOffset(), setLineCap(), setLineJoin(), setOpacity(), and setWidth().
| void te::se::Stroke::setWidth | ( | const std::string & | width | ) |
Definition at line 98 of file Stroke.cpp.
References setParameter(), and sm_width.
Referenced by te::se::CreateStroke(), te::qt::widgets::BasicStrokeWidget::onStrokeWidthDoubleSpinBoxValueChanged(), and te::qt::widgets::BasicStrokePropertyItem::valueChanged().
|
private |
The GraphicFill both indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic. (Optional)
Definition at line 169 of file Stroke.h.
Referenced by getGraphicFill(), setGraphicFill(), and ~Stroke().
|
private |
The GraphicStroke both indicates that a repeated-linear-graphic stroke type will be used. (Optional)
Definition at line 170 of file Stroke.h.
Referenced by getGraphicStroke(), setGraphicStroke(), and ~Stroke().
|
private |
If neither a GraphicFill nor GraphicStroke is given, then the line Symbolizer will render a solid color. (Optional)
Definition at line 171 of file Stroke.h.
Referenced by add(), clone(), getParameter(), setParameter(), and ~Stroke().
|
staticprivate |
SVG/CSS "stroke-dasharray" parameter.
Definition at line 178 of file Stroke.h.
Referenced by getDashArray(), and setDashArray().
|
staticprivate |
SVG/CSS "stroke-dashoffset" parameter.
Definition at line 179 of file Stroke.h.
Referenced by setDashOffset().
|
staticprivate |
SVG/CSS "stroke-linecap" parameter.
Definition at line 177 of file Stroke.h.
Referenced by getLineCap(), and setLineCap().
|
staticprivate |
SVG/CSS "stroke-linejoin" parameter.
Definition at line 176 of file Stroke.h.
Referenced by getLineJoin(), and setLineJoin().
|
staticprivate |
SVG/CSS "stroke-opacity parameter.
Definition at line 174 of file Stroke.h.
Referenced by getOpacity(), and setOpacity().
|
staticprivate |
SVG/CSS "stroke" parameter.
Definition at line 173 of file Stroke.h.
Referenced by getColor(), and setColor().
|
staticprivate |
SVG/CSS "stroke-width" parameter.
Definition at line 175 of file Stroke.h.
Referenced by getWidth(), and setWidth().