27 #include "../common/STLUtils.h"
81 std::string name = p->
getName();
82 std::map<std::string, te::se::SvgParameter*>::iterator it = m_svgParams.find(name);
83 if(it != m_svgParams.end())
85 m_svgParams[name] = p;
90 setParameter(sm_stroke, color);
95 setParameter(sm_opacity, opacity);
100 setParameter(sm_width, width);
105 setParameter(sm_linejoin, join);
110 setParameter(sm_linecap, cap);
115 setParameter(sm_dasharray, dasharray);
120 setParameter(sm_dashoffset, offset);
125 return getParameter(sm_stroke);
130 return getParameter(sm_opacity);
135 return getParameter(sm_width);
140 return getParameter(sm_linejoin);
145 return getParameter(sm_linecap);
150 return getParameter(sm_dasharray);
155 return getParameter(sm_dashoffset);
162 std::map<std::string, SvgParameter*>::const_iterator it;
163 for(it = m_svgParams.begin(); it != m_svgParams.end(); ++it)
164 stroke->
add(it->second->clone());
166 const Graphic* graphicFill = getGraphicFill();
179 std::map<std::string, te::se::SvgParameter*>::iterator it = m_svgParams.find(name);
180 if(it != m_svgParams.end())
187 std::map<std::string, te::se::SvgParameter*>::const_iterator it = m_svgParams.find(name);
188 if(it != m_svgParams.end())
Stroke * clone() const
It creates a new copy of this object.
static const std::string sm_opacity
SVG/CSS "stroke-opacity parameter.
Stroke()
It initializes a new Stroke.
void setGraphicFill(Graphic *fill)
Sets the GraphicFill element to this Stroke. GraphicFill defines that the pixels of the line will be ...
GraphicStroke * clone() const
It creates a new copy of this object.
A SvgParameter refers to an SVG/CSS graphical-formatting parameter.
const SvgParameter * getLineCap() const
void setWidth(const std::string &width)
static const std::string sm_linejoin
SVG/CSS "stroke-linejoin" parameter.
const SvgParameter * getParameter(const std::string &name) const
const SvgParameter * getLineJoin() const
A Graphic is a graphic symbol with an inherent shape, color(s), and possibly size.
void setDashArray(const std::string &dasharray)
void setColor(const std::string &color)
static const std::string sm_width
SVG/CSS "stroke-width" parameter.
void setOpacity(const std::string &opacity)
Graphic * clone() const
It creates a new copy of this object.
const SvgParameter * getOpacity() const
const Graphic * getGraphicFill() const
Gets the GraphicFill element associate to this Stroke.
const SvgParameter * getColor() const
const GraphicStroke * getGraphicStroke() const
Gets the GraphicStroke element associate to this Stroke.
void setLineCap(const std::string &cap)
std::string getName() const
static const std::string sm_dashoffset
SVG/CSS "stroke-dashoffset" parameter.
A GraphicStroke defines a repeated-linear graphic pattern to be used for stroking a line...
void setParameter(const std::string &name, const std::string &value)
void setLineJoin(const std::string &join)
const SvgParameter * getDashArray() const
void setGraphicStroke(GraphicStroke *stroke)
Sets the GraphicStroke element to this Stroke. GraphicStroke defines that a repeated linear graphic i...
A Stroke specifies the appearance of a linear geometry.
A Graphic is a graphic symbol with an inherent shape, color(s), and possibly size.
static const std::string sm_stroke
SVG/CSS "stroke" parameter.
A SvgParameter refers to an SVG/CSS graphical-formatting parameter.
const SvgParameter * setDashOffset() const
static const std::string sm_linecap
SVG/CSS "stroke-linecap" parameter.
void FreeContents(boost::unordered_map< K, V * > &m)
This function can be applied to a map of pointers. It will delete each pointer in the map...
A Stroke specifies the appearance of a linear geometry.
void add(SvgParameter *p)
Add a SvgParameter to this Stroke.
A GraphicStroke defines a repeated-linear graphic pattern to be used for stroking a line...
const SvgParameter * getWidth() const
static const std::string sm_dasharray
SVG/CSS "stroke-dasharray" parameter.