27 #include "../common/STLUtils.h"
59 std::string name = p->
getName();
60 std::map<std::string, te::se::SvgParameter*>::iterator it = m_svgParams.find(name);
61 if(it != m_svgParams.end())
63 m_svgParams[name] = p;
68 setParameter(sm_fill, color);
73 setParameter(sm_opacity, opacity);
78 return getParameter(sm_fill);
83 return getParameter(sm_opacity);
90 std::map<std::string, SvgParameter*>::const_iterator it;
91 for(it = m_svgParams.begin(); it != m_svgParams.end(); ++it)
92 fill->
add(it->second->clone());
94 const Graphic* graphicFill = getGraphicFill();
103 std::map<std::string, te::se::SvgParameter*>::iterator it = m_svgParams.find(name);
104 if(it != m_svgParams.end())
111 std::map<std::string, te::se::SvgParameter*>::const_iterator it = m_svgParams.find(name);
112 if(it != m_svgParams.end())
A SvgParameter refers to an SVG/CSS graphical-formatting parameter.
Fill()
It initializes a new Fill.
A Fill specifies the pattern for filling an area geometry.
void setColor(const std::string &color)
A Graphic is a graphic symbol with an inherent shape, color(s), and possibly size.
static const std::string sm_fill
SVG/CSS "fill" parameter.
Graphic * clone() const
It creates a new copy of this object.
static const std::string sm_opacity
SVG/CSS "fill-opacity parameter.
const Graphic * getGraphicFill() const
Gets the GraphicFill element associate to this Fill.
const SvgParameter * getParameter(const std::string &name) const
void setOpacity(const std::string &opacity)
A Fill specifies the pattern for filling an area geometry.
std::string getName() const
void add(SvgParameter *p)
Add a SvgParameter to this Fill.
void setGraphicFill(Graphic *g)
Sets the GraphicFill element to this Fill. GraphicFill defines that the pixels of the area will be dr...
Fill * clone() const
It creates a new copy of this object.
A Graphic is a graphic symbol with an inherent shape, color(s), and possibly size.
const SvgParameter * getColor() const
A SvgParameter refers to an SVG/CSS graphical-formatting 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...
void setParameter(const std::string &name, const std::string &value)
const SvgParameter * getOpacity() const