All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::se::Stroke Class Reference

A Stroke specifies the appearance of a linear geometry. More...

#include <Stroke.h>

Inheritance diagram for te::se::Stroke:

Public Member Functions

Strokeclone () 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 GraphicgetGraphicFill () 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 GraphicStrokegetGraphicStroke () 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 SvgParametergetColor () const
 
const SvgParametergetOpacity () const
 
const SvgParametergetWidth () const
 
const SvgParametergetLineJoin () const
 
const SvgParametergetLineCap () const
 
const SvgParametergetDashArray () const
 
const SvgParametersetDashOffset () const
 

Private Member Functions

const SvgParametergetParameter (const std::string &name) const
 
void setParameter (const std::string &name, const std::string &value)
 

Private Attributes

Graphicm_fill
 The GraphicFill both indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic. (Optional) More...
 
GraphicStrokem_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...
 

Detailed Description

A Stroke specifies the appearance of a linear geometry.

It is defined in parallel with SVG strokes. There are three basic types of strokes:

  • solid-color
  • GraphicFill (stipple)
  • repeated linear GraphicStroke

If neither a GraphicFill nor GraphicStroke element is given, then the line Symbolizer will render a solid color.

See also
LineSymbolizer, Graphic, GraphicStroke, Mark

Definition at line 67 of file Stroke.h.

Constructor & Destructor Documentation

te::se::Stroke::Stroke ( )

It initializes a new Stroke.

Definition at line 44 of file Stroke.cpp.

te::se::Stroke::~Stroke ( )

Destructor.

Definition at line 50 of file Stroke.cpp.

References te::common::FreeContents().

Member Function Documentation

void te::se::Stroke::add ( SvgParameter p)

Add a SvgParameter to this Stroke.

Note
If there is already a SvgParamater with the same name it will be overrided.
The Stroke object will take the ownership of the informed p pointer.

Definition at line 79 of file Stroke.cpp.

References te::se::SvgParameter::getName().

Referenced by clone().

const te::se::SvgParameter * te::se::Stroke::getColor ( ) const

Definition at line 123 of file Stroke.cpp.

Referenced by te::se::GetColor(), and te::se::serialize::Save().

const te::se::SvgParameter * te::se::Stroke::getDashArray ( ) const
const te::se::Graphic * te::se::Stroke::getGraphicFill ( ) const

Gets the GraphicFill element associate to this Stroke.

Returns
The GraphicFill element.

Definition at line 63 of file Stroke.cpp.

Referenced by 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.

Returns
The GraphicStroke element.

Definition at line 74 of file Stroke.cpp.

Referenced by te::se::serialize::Save().

const te::se::SvgParameter * te::se::Stroke::getLineCap ( ) const
const te::se::SvgParameter * te::se::Stroke::getLineJoin ( ) const
const te::se::SvgParameter * te::se::Stroke::getOpacity ( ) const

Definition at line 128 of file Stroke.cpp.

Referenced by te::se::GetColor(), and te::se::serialize::Save().

const te::se::SvgParameter * te::se::Stroke::getParameter ( const std::string &  name) const
private

Definition at line 185 of file Stroke.cpp.

const te::se::SvgParameter * te::se::Stroke::getWidth ( ) const
void te::se::Stroke::setColor ( const std::string &  color)

Definition at line 88 of file Stroke.cpp.

Referenced by te::se::CreateStroke().

void te::se::Stroke::setDashArray ( const std::string &  dasharray)

Definition at line 113 of file Stroke.cpp.

Referenced by te::se::CreateStroke().

void te::se::Stroke::setDashOffset ( const std::string &  offset)

Definition at line 118 of file Stroke.cpp.

Referenced by te::se::serialize::Save().

const te::se::SvgParameter * te::se::Stroke::setDashOffset ( ) const

Definition at line 153 of file Stroke.cpp.

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.

Note
The Stroke object will take the ownership of the informed fill pointer.

Definition at line 57 of file Stroke.cpp.

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.

Note
The Stroke object will take the ownership of the informed stroke pointer.

Definition at line 68 of file Stroke.cpp.

Referenced by clone().

void te::se::Stroke::setLineCap ( const std::string &  cap)

Definition at line 108 of file Stroke.cpp.

Referenced by te::se::CreateStroke().

void te::se::Stroke::setLineJoin ( const std::string &  join)

Definition at line 103 of file Stroke.cpp.

Referenced by te::se::CreateStroke().

void te::se::Stroke::setOpacity ( const std::string &  opacity)

Definition at line 93 of file Stroke.cpp.

Referenced by te::se::CreateStroke(), and te::qt::widgets::HistogramChart::setData().

void te::se::Stroke::setParameter ( const std::string &  name,
const std::string &  value 
)
private

Definition at line 177 of file Stroke.cpp.

void te::se::Stroke::setWidth ( const std::string &  width)

Definition at line 98 of file Stroke.cpp.

Referenced by te::se::CreateStroke().

Member Data Documentation

Graphic* te::se::Stroke::m_fill
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.

GraphicStroke* te::se::Stroke::m_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.

std::map<std::string, SvgParameter*> te::se::Stroke::m_svgParams
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.

const std::string te::se::Stroke::sm_dasharray = "stroke-dasharray"
staticprivate

SVG/CSS "stroke-dasharray" parameter.

Definition at line 178 of file Stroke.h.

const std::string te::se::Stroke::sm_dashoffset = "stroke-dashoffset"
staticprivate

SVG/CSS "stroke-dashoffset" parameter.

Definition at line 179 of file Stroke.h.

const std::string te::se::Stroke::sm_linecap = "stroke-linecap"
staticprivate

SVG/CSS "stroke-linecap" parameter.

Definition at line 177 of file Stroke.h.

const std::string te::se::Stroke::sm_linejoin = "stroke-linejoin"
staticprivate

SVG/CSS "stroke-linejoin" parameter.

Definition at line 176 of file Stroke.h.

const std::string te::se::Stroke::sm_opacity = "stroke-opacity"
staticprivate

SVG/CSS "stroke-opacity parameter.

Definition at line 174 of file Stroke.h.

const std::string te::se::Stroke::sm_stroke = "stroke"
staticprivate

SVG/CSS "stroke" parameter.

Definition at line 173 of file Stroke.h.

const std::string te::se::Stroke::sm_width = "stroke-width"
staticprivate

SVG/CSS "stroke-width" parameter.

Definition at line 175 of file Stroke.h.


The documentation for this class was generated from the following files: