A PolygonSymbolizer is used to draw a polygon (or other area-type geometries), including filling its interior and stroking its border (outline). More...
#include <PolygonSymbolizer.h>
Public Types | |
typedef R | ReturnType |
typedef Visitor | VisitorType |
Public Member Functions | |
virtual ReturnType | accept (VisitorType &guest) const =0 |
It call the visit method from the guest object. More... | |
Symbolizer * | clone () const |
It creates a new copy of this object. More... | |
Initializer Methods | |
Methods related to instantiation and destruction. | |
PolygonSymbolizer () | |
It initializes a new PolygonSymbolizer. More... | |
PolygonSymbolizer (const PolygonSymbolizer &rhs) | |
Copy constructor. More... | |
~PolygonSymbolizer () | |
Destructor. More... | |
Accessor methods | |
Methods used to get or set properties. | |
void | setGeometry (te::fe::PropertyName *geometry) |
The Geometry element of a PolygonSymbolizer defines the linear geometry to be used for styling. The Geometry element is optional and if it is absent then the all geometry properties of the feature type that is used in the containing FeatureType are used. Most frequently, though, feature types will have only a single geometry property. See OGC te::fe::PropertyName class for more information on attribute names. If a polygon has "holes", then they are not filled, but the borders around the holes are stroked in the usual way. "Islands" within holes are filled and stroked, and so on. If a point geometry is referenced instead of a polygon, then a small, square, ortho-normal polygon should be constructed for rendering. If a line is referenced, then the line (string) is closed for filling (only) by connecting its end point to its start point, any line crossings are corrected in some way, and only the original line is stroked. If a raster geometry is used, then the raster-coverage area is used as the polygon. A missing Geometry element selects the "default" geometry for a feature type. More... | |
const te::fe::PropertyName * | getGeometry () const |
void | setFill (Fill *f) |
A Fill specifies the pattern for filling an area geometry. More... | |
const Fill * | getFill () const |
Gets the Fill associates with the PolygonSymbolizer. More... | |
void | setStroke (Stroke *stroke) |
A Stroke specifies the appearance of a linear geometry. More... | |
const Stroke * | getStroke () const |
Gets the Stroke associates with the PolygonSymbolizer. More... | |
void | setDisplacement (Displacement *d) |
The Displacement gives the X and Y displacements from the original geometry. More... | |
const Displacement * | getDisplacement () const |
void | setPerpendicularOffset (ParameterValue *perpendicularOffset) |
PerpendicularOffset works as defined for LineSymbolizer, allowing to draw polygons smaller or larger than their actual geometry. More... | |
const ParameterValue * | getPerpendicularOffset () 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 Description * | getDescription () const |
void | setBaseSymbolizer (te::xl::SimpleLink *baseSymbolizer) |
const te::xl::SimpleLink * | getBaseSymbolizer () 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 | |
Displacement * | m_displacement |
The Displacement gives the X and Y displacements from the original geometry. (Optional) More... | |
Fill * | m_fill |
Specifies how the area of the geometry will be filled. (Optional) More... | |
te::fe::PropertyName * | m_geometry |
A Geometry gives reference to a (the) geometry property of a feature to be used for rendering. (Optional) More... | |
ParameterValue * | m_perpendicularOffset |
A "PerpendicularOffset" gives the perpendicular distance away from a line to draw a label. (Optional) More... | |
Stroke * | m_stroke |
A "Stroke" specifies the appearance of a linear geometry. (Optional) More... | |
Static Private Attributes | |
static const std::string | sm_type |
A static data member used in the implementation of getType method. More... | |
A PolygonSymbolizer is used to draw a polygon (or other area-type geometries), including filling its interior and stroking its border (outline).
The Fill and Stroke elements are contained in the PolygonSymbolizer in the conceptual order that they are used and plotted using the "painters model", where the Fill will be rendered first, and then the Stroke will be rendered on top of the fill. A missing Stroke element means that the geometry will not be stroked.
Definition at line 60 of file PolygonSymbolizer.h.
|
inherited |
Definition at line 58 of file BaseVisitable.h.
|
inherited |
Definition at line 57 of file BaseVisitable.h.
te::se::PolygonSymbolizer::PolygonSymbolizer | ( | ) |
It initializes a new PolygonSymbolizer.
Definition at line 36 of file PolygonSymbolizer.cpp.
te::se::PolygonSymbolizer::PolygonSymbolizer | ( | const PolygonSymbolizer & | rhs | ) |
Copy constructor.
rhs | The other polygon symbolizer. |
Definition at line 46 of file PolygonSymbolizer.cpp.
References te::se::Displacement::clone(), te::se::Fill::clone(), te::se::ParameterValue::clone(), te::se::Stroke::clone(), te::fe::PropertyName::getName(), m_displacement, m_fill, m_geometry, m_perpendicularOffset, and m_stroke.
te::se::PolygonSymbolizer::~PolygonSymbolizer | ( | ) |
Destructor.
Definition at line 70 of file PolygonSymbolizer.cpp.
|
pure virtualinherited |
It call the visit method from the guest object.
guest | The guest or visitor. |
|
virtual |
It creates a new copy of this object.
Implements te::se::Symbolizer.
Definition at line 139 of file PolygonSymbolizer.cpp.
Referenced by te::qt::widgets::ROIManagerWidget::onVectorLayerToolButtonClicked(), and te::qt::widgets::PolygonSymbolizerWidget::setSymbolizer().
|
inherited |
Definition at line 94 of file Symbolizer.cpp.
Referenced by te::se::serialize::WriteSymbolizerHelper().
|
inherited |
Definition at line 83 of file Symbolizer.cpp.
Referenced by te::se::serialize::WriteSymbolizerHelper().
const te::se::Displacement * te::se::PolygonSymbolizer::getDisplacement | ( | ) | const |
Definition at line 118 of file PolygonSymbolizer.cpp.
Referenced by PolygonSymbolizerWriter().
const te::se::Fill * te::se::PolygonSymbolizer::getFill | ( | ) | const |
Gets the Fill associates with the PolygonSymbolizer.
Definition at line 96 of file PolygonSymbolizer.cpp.
Referenced by te::qt::widgets::ROIManagerWidget::onVectorLayerToolButtonClicked(), PolygonSymbolizerWriter(), te::se::SymbolizerColorFinder::visit(), te::map::CanvasConfigurer::visit(), and te::qt::widgets::ChartConfigurer::visit().
const te::fe::PropertyName * te::se::PolygonSymbolizer::getGeometry | ( | ) | const |
Definition at line 85 of file PolygonSymbolizer.cpp.
Referenced by PolygonSymbolizerWriter().
|
inherited |
Definition at line 72 of file Symbolizer.cpp.
Referenced by te::layout::LegendChildModel::drawLegend(), te::layout::LegendModel::drawStyleLegend(), and te::se::serialize::WriteSymbolizerHelper().
const te::se::ParameterValue * te::se::PolygonSymbolizer::getPerpendicularOffset | ( | ) | const |
Definition at line 129 of file PolygonSymbolizer.cpp.
Referenced by PolygonSymbolizerWriter().
const te::se::Stroke * te::se::PolygonSymbolizer::getStroke | ( | ) | const |
Gets the Stroke associates with the PolygonSymbolizer.
Definition at line 107 of file PolygonSymbolizer.cpp.
Referenced by PolygonSymbolizerWriter(), te::map::CanvasConfigurer::visit(), and te::qt::widgets::ChartConfigurer::visit().
|
virtual |
It returns the symbolizer type.
Implements te::se::Symbolizer.
Definition at line 134 of file PolygonSymbolizer.cpp.
|
inherited |
Definition at line 114 of file Symbolizer.cpp.
|
inherited |
Definition at line 104 of file Symbolizer.cpp.
Referenced by te::se::serialize::WriteSymbolizerHelper().
|
inherited |
Definition at line 88 of file Symbolizer.cpp.
|
inherited |
Definition at line 77 of file Symbolizer.cpp.
Referenced by te::se::serialize::ReadSymbolizerHelper().
void te::se::PolygonSymbolizer::setDisplacement | ( | Displacement * | d | ) |
The Displacement gives the X and Y displacements from the original geometry.
This element may be used to avoid over-plotting of multiple PolygonSymbolizers for one geometry or supplying "shadows" of polygon gemeotries. The displacements are in units of pixels above and to the right of the point. The default displacement is X = 0, Y = 0.
d |
Definition at line 112 of file PolygonSymbolizer.cpp.
void te::se::PolygonSymbolizer::setFill | ( | Fill * | f | ) |
A Fill specifies the pattern for filling an area geometry.
The allowed SvgParameters are: "fill" (color) and "fill-opacity".
Definition at line 90 of file PolygonSymbolizer.cpp.
Referenced by te::se::CreatePolygonSymbolizer(), te::se::CreateSymbolizer(), te::qt::widgets::ROIManagerWidget::onVectorLayerToolButtonClicked(), te::qt::widgets::PolygonSymbolizerWidget::PolygonSymbolizerWidget(), and te::qt::widgets::PolygonSymbolizerProperty::setSymbolizer().
void te::se::PolygonSymbolizer::setGeometry | ( | te::fe::PropertyName * | geometry | ) |
The Geometry element of a PolygonSymbolizer defines the linear geometry to be used for styling. The Geometry element is optional and if it is absent then the all geometry properties of the feature type that is used in the containing FeatureType are used. Most frequently, though, feature types will have only a single geometry property. See OGC te::fe::PropertyName class for more information on attribute names. If a polygon has "holes", then they are not filled, but the borders around the holes are stroked in the usual way. "Islands" within holes are filled and stroked, and so on. If a point geometry is referenced instead of a polygon, then a small, square, ortho-normal polygon should be constructed for rendering. If a line is referenced, then the line (string) is closed for filling (only) by connecting its end point to its start point, any line crossings are corrected in some way, and only the original line is stroked. If a raster geometry is used, then the raster-coverage area is used as the polygon. A missing Geometry element selects the "default" geometry for a feature type.
Definition at line 79 of file PolygonSymbolizer.cpp.
|
inherited |
Definition at line 67 of file Symbolizer.cpp.
Referenced by te::se::serialize::ReadSymbolizerHelper().
void te::se::PolygonSymbolizer::setPerpendicularOffset | ( | ParameterValue * | perpendicularOffset | ) |
PerpendicularOffset works as defined for LineSymbolizer, allowing to draw polygons smaller or larger than their actual geometry.
The distance is in uoms and is positive to the outside of the polygon. Negative numbers mean drawing the polygon smaller. The default offset is 0.
Definition at line 123 of file PolygonSymbolizer.cpp.
void te::se::PolygonSymbolizer::setStroke | ( | Stroke * | stroke | ) |
A Stroke specifies the appearance of a linear geometry.
A missing Stroke element means that the geometry will not be stroked.
Definition at line 101 of file PolygonSymbolizer.cpp.
Referenced by te::se::CreatePolygonSymbolizer(), te::se::CreateSymbolizer(), and te::qt::widgets::PolygonSymbolizerWidget::PolygonSymbolizerWidget().
|
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.
|
inherited |
Definition at line 99 of file Symbolizer.cpp.
Referenced by te::se::serialize::ReadSymbolizerHelper().
|
private |
The Displacement gives the X and Y displacements from the original geometry. (Optional)
Definition at line 191 of file PolygonSymbolizer.h.
Referenced by PolygonSymbolizer().
|
private |
Specifies how the area of the geometry will be filled. (Optional)
Definition at line 189 of file PolygonSymbolizer.h.
Referenced by PolygonSymbolizer().
|
private |
A Geometry gives reference to a (the) geometry property of a feature to be used for rendering. (Optional)
Definition at line 188 of file PolygonSymbolizer.h.
Referenced by PolygonSymbolizer().
|
private |
A "PerpendicularOffset" gives the perpendicular distance away from a line to draw a label. (Optional)
Definition at line 192 of file PolygonSymbolizer.h.
Referenced by PolygonSymbolizer().
|
private |
A "Stroke" specifies the appearance of a linear geometry. (Optional)
Definition at line 190 of file PolygonSymbolizer.h.
Referenced by PolygonSymbolizer().
|
staticprivate |
A static data member used in the implementation of getType method.
Definition at line 194 of file PolygonSymbolizer.h.