te::se::TextSymbolizer Class Referenceabstract

A TextSymbolizer is used to render text labels according to various graphical parameters. More...

#include <TextSymbolizer.h>

Inheritance diagram for te::se::TextSymbolizer:
te::se::Symbolizer te::common::BaseVisitable< Visitor >

Public Types

typedef void ReturnType
 
typedef Visitor VisitorType
 

Public Member Functions

virtual ReturnType accept (VisitorType &guest) const =0
 It call the visit method from the guest object. More...
 
Symbolizerclone () const
 It creates a new copy of this object. More...
 
Initializer Methods

Methods related to instantiation and destruction.

 TextSymbolizer ()
 It initializes a new TextSymbolizer. More...
 
 TextSymbolizer (const TextSymbolizer &rhs)
 Copy constructor. More...
 
 ~TextSymbolizer ()
 Destructor. More...
 
Accessor methods

Methods used to get or set properties.

void setGeometry (te::fe::PropertyName *g)
 
void setLabel (ParameterValue *l)
 
const ParameterValuegetLabel () const
 
void setFont (Font *f)
 
const FontgetFont () const
 
void setLabelPlacement (LabelPlacement *l)
 
const LabelPlacementgetLabelPlacement () const
 
void setHalo (Halo *h)
 
const HalogetHalo () const
 
void setFill (Fill *f)
 
const FillgetFill () const
 
const std::string & getType () const
 It returns the symbolizer type. More...
 
Accessor methods

Methods used to get or set properties.

void setName (const std::string &name)
 
const std::string & getName () const
 
void setDescription (Description *d)
 
const DescriptiongetDescription () const
 
void setBaseSymbolizer (te::xl::SimpleLink *baseSymbolizer)
 
const te::xl::SimpleLinkgetBaseSymbolizer () const
 
void setVersion (const std::string &version)
 
const std::string & getVersion () const
 
void setUom (const te::common::BaseUnitOfMeasure *uom)
 It sets the unit-of-measure. More...
 
const te::common::BaseUnitOfMeasure * getUom () const
 

Private Attributes

Fillm_fill
 It specifies how the text area will be filled. (Optional) More...
 
Fontm_font
 The font element specifies the text font to use. (Optional) More...
 
te::fe::PropertyNamem_geometry
 The Geometry will be interpreted as a point or a line as needed by the LabelPlacement. (Optional) More...
 
Halom_halo
 A Halo is a type of Fill that is applied to the backgrounds of font glyphs. (Optional) More...
 
ParameterValuem_label
 The label specifies the textual content to be rendered. (Optional) More...
 
LabelPlacementm_labelPlacement
 The label placement specifies where and how a text label should be rendered relative to a geometry. (Optional) More...
 

Static Private Attributes

static const std::string sm_type
 A static data member used in the implementation of getType method. More...
 

Detailed Description

A TextSymbolizer is used to render text labels according to various graphical parameters.

In this case, if a line, polygon, or raster geometry is used with this Symbolizer, then the semantic is to use the centroid of the geometry, or any similar representative point.

See also
Symbolizer, ParameterValue, Font, LabelPlacement, Halo, Fill, te::fe::PropertyName
Note
If a Label element is not provided in a TextSymbolizer, then no text shall be rendered.

Definition at line 62 of file TextSymbolizer.h.

Member Typedef Documentation

typedef void te::common::BaseVisitable< Visitor , void >::ReturnType
inherited

Definition at line 58 of file BaseVisitable.h.

typedef Visitor te::common::BaseVisitable< Visitor , void >::VisitorType
inherited

Definition at line 57 of file BaseVisitable.h.

Constructor & Destructor Documentation

te::se::TextSymbolizer::TextSymbolizer ( )

It initializes a new TextSymbolizer.

Definition at line 37 of file TextSymbolizer.cpp.

Referenced by clone().

te::se::TextSymbolizer::TextSymbolizer ( const TextSymbolizer rhs)
te::se::TextSymbolizer::~TextSymbolizer ( )

Destructor.

Definition at line 75 of file TextSymbolizer.cpp.

References m_fill, m_font, m_geometry, m_halo, m_label, and m_labelPlacement.

Member Function Documentation

virtual ReturnType te::common::BaseVisitable< Visitor , void >::accept ( VisitorType guest) const
pure virtualinherited

It call the visit method from the guest object.

Parameters
guestThe guest or visitor.
Returns
Any valid value define by the template type R.
te::se::Symbolizer * te::se::TextSymbolizer::clone ( ) const
virtual

It creates a new copy of this object.

Implements te::se::Symbolizer.

Definition at line 151 of file TextSymbolizer.cpp.

References TextSymbolizer().

Referenced by te::qt::widgets::TextPropertyItem::getTextSymbolizer(), and te::qt::widgets::TextPropertyItem::setTextSymbolizer().

const te::xl::SimpleLink * te::se::Symbolizer::getBaseSymbolizer ( ) const
inherited
const te::se::Description * te::se::Symbolizer::getDescription ( ) const
inherited
const te::se::Halo * te::se::TextSymbolizer::getHalo ( ) const
const std::string & te::se::Symbolizer::getName ( ) const
inherited

Definition at line 72 of file Symbolizer.cpp.

References te::se::Symbolizer::m_name.

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

const std::string & te::se::TextSymbolizer::getType ( ) const
virtual

It returns the symbolizer type.

Returns
The symbolizer type.

Implements te::se::Symbolizer.

Definition at line 146 of file TextSymbolizer.cpp.

References sm_type.

const te::common::BaseUnitOfMeasure * te::se::Symbolizer::getUom ( ) const
inherited

Definition at line 114 of file Symbolizer.cpp.

References te::se::Symbolizer::m_uom.

const std::string & te::se::Symbolizer::getVersion ( ) const
inherited
void te::se::Symbolizer::setBaseSymbolizer ( te::xl::SimpleLink baseSymbolizer)
inherited

Definition at line 88 of file Symbolizer.cpp.

References te::se::Symbolizer::m_baseSymbolizer.

void te::se::Symbolizer::setDescription ( Description d)
inherited

Definition at line 77 of file Symbolizer.cpp.

References d, and te::se::Symbolizer::m_description.

Referenced by EncodeStyle(), and te::se::serialize::ReadSymbolizerHelper().

void te::se::TextSymbolizer::setFont ( Font f)
void te::se::TextSymbolizer::setGeometry ( te::fe::PropertyName g)

Definition at line 85 of file TextSymbolizer.cpp.

References m_geometry.

Referenced by EncodeStyle().

void te::se::TextSymbolizer::setHalo ( Halo h)

Definition at line 124 of file TextSymbolizer.cpp.

References m_halo.

Referenced by te::qt::widgets::TextSymbolizerProperty::onHaloChanged().

void te::se::TextSymbolizer::setLabelPlacement ( LabelPlacement l)
void te::se::Symbolizer::setName ( const std::string &  name)
inherited

Definition at line 67 of file Symbolizer.cpp.

References te::se::Symbolizer::m_name.

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

void te::se::Symbolizer::setUom ( const te::common::BaseUnitOfMeasure *  uom)
inherited

It sets the unit-of-measure.

All Symbolizers include an optional gml:uom-attribute as used by GML (this is set inside the abstract SymbolizerType and therefore inherited by all Symbolizers). This applies to all elements included inside a Symbolizer such as stroke-width, size, font-size, Gap, InitialGap, Displacement and PerpendicularOffset. If no uom is set inside of Symbolizer, all units are measured in pixel, the behaviour used by SLD 1.0.0. The following uom definitions are recommended to be used:

Definition at line 109 of file Symbolizer.cpp.

References te::se::Symbolizer::m_uom.

void te::se::Symbolizer::setVersion ( const std::string &  version)
inherited

Definition at line 99 of file Symbolizer.cpp.

References te::se::Symbolizer::m_version.

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

Member Data Documentation

Fill* te::se::TextSymbolizer::m_fill
private

It specifies how the text area will be filled. (Optional)

Definition at line 129 of file TextSymbolizer.h.

Referenced by getFill(), setFill(), TextSymbolizer(), and ~TextSymbolizer().

Font* te::se::TextSymbolizer::m_font
private

The font element specifies the text font to use. (Optional)

Definition at line 126 of file TextSymbolizer.h.

Referenced by getFont(), setFont(), TextSymbolizer(), and ~TextSymbolizer().

te::fe::PropertyName* te::se::TextSymbolizer::m_geometry
private

The Geometry will be interpreted as a point or a line as needed by the LabelPlacement. (Optional)

Definition at line 124 of file TextSymbolizer.h.

Referenced by setGeometry(), TextSymbolizer(), and ~TextSymbolizer().

Halo* te::se::TextSymbolizer::m_halo
private

A Halo is a type of Fill that is applied to the backgrounds of font glyphs. (Optional)

Definition at line 128 of file TextSymbolizer.h.

Referenced by getHalo(), setHalo(), TextSymbolizer(), and ~TextSymbolizer().

ParameterValue* te::se::TextSymbolizer::m_label
private

The label specifies the textual content to be rendered. (Optional)

Definition at line 125 of file TextSymbolizer.h.

Referenced by getLabel(), setLabel(), TextSymbolizer(), and ~TextSymbolizer().

LabelPlacement* te::se::TextSymbolizer::m_labelPlacement
private

The label placement specifies where and how a text label should be rendered relative to a geometry. (Optional)

Definition at line 127 of file TextSymbolizer.h.

Referenced by getLabelPlacement(), setLabelPlacement(), TextSymbolizer(), and ~TextSymbolizer().

const std::string te::se::TextSymbolizer::sm_type
staticprivate

A static data member used in the implementation of getType method.

Definition at line 131 of file TextSymbolizer.h.

Referenced by getType().


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