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>
|
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...
|
|
|
Methods related to instantiation and destruction.
|
| PolygonSymbolizer () |
| It initializes a new PolygonSymbolizer. More...
|
|
| PolygonSymbolizer (const PolygonSymbolizer &rhs) |
| Copy constructor. More...
|
|
| ~PolygonSymbolizer () |
| Destructor. More...
|
|
|
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...
|
|
|
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 |
|
|
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.
- See also
- Symbolizer, Fill, Stroke, te::fe::PropertyName, Displacement, ParameterValue, ImageOutline
Definition at line 60 of file PolygonSymbolizer.h.
te::se::PolygonSymbolizer::PolygonSymbolizer |
( |
| ) |
|
Copy constructor.
- Parameters
-
rhs | The other polygon symbolizer. |
te::se::PolygonSymbolizer::~PolygonSymbolizer |
( |
| ) |
|
It call the visit method from the guest object.
- Parameters
-
guest | The guest or visitor. |
- Returns
- Any valid value define by the template type R.
Symbolizer* te::se::PolygonSymbolizer::clone |
( |
| ) |
const |
|
virtual |
const Description* te::se::Symbolizer::getDescription |
( |
| ) |
const |
|
inherited |
const Displacement* te::se::PolygonSymbolizer::getDisplacement |
( |
| ) |
const |
const Fill* te::se::PolygonSymbolizer::getFill |
( |
| ) |
const |
const std::string& te::se::Symbolizer::getName |
( |
| ) |
const |
|
inherited |
const ParameterValue* te::se::PolygonSymbolizer::getPerpendicularOffset |
( |
| ) |
const |
const Stroke* te::se::PolygonSymbolizer::getStroke |
( |
| ) |
const |
const std::string& te::se::PolygonSymbolizer::getType |
( |
| ) |
const |
|
virtual |
It returns the symbolizer type.
- Returns
- The symbolizer type.
Implements te::se::Symbolizer.
const te::common::BaseUnitOfMeasure* te::se::Symbolizer::getUom |
( |
| ) |
const |
|
inherited |
const std::string& te::se::Symbolizer::getVersion |
( |
| ) |
const |
|
inherited |
void te::se::Symbolizer::setDescription |
( |
Description * |
d | ) |
|
|
inherited |
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.
- Parameters
-
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".
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.
- Note
- Geometry types other than inherently linear types can also be used. If a point geometry is used, it should be interpreted as a line of "epsilon" (arbitrarily small) length with a horizontal orientation centered on the point, and should be rendered with two end caps. If a polygon is used (or other "area" type), then its closed outline is used as the line string (with no end caps). If a raster geometry is used, its coverage-area outline is used for the line, rendered with no end caps.
void te::se::Symbolizer::setName |
( |
const std::string & |
name | ) |
|
|
inherited |
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.
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.
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:
void te::se::Symbolizer::setVersion |
( |
const std::string & |
version | ) |
|
|
inherited |
Fill* te::se::PolygonSymbolizer::m_fill |
|
private |
Specifies how the area of the geometry will be filled. (Optional)
Definition at line 189 of file PolygonSymbolizer.h.
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.
A "PerpendicularOffset" gives the perpendicular distance away from a line to draw a label. (Optional)
Definition at line 192 of file PolygonSymbolizer.h.
Stroke* te::se::PolygonSymbolizer::m_stroke |
|
private |
A "Stroke" specifies the appearance of a linear geometry. (Optional)
Definition at line 190 of file PolygonSymbolizer.h.
const std::string te::se::PolygonSymbolizer::sm_type |
|
staticprivate |
A static data member used in the implementation of getType method.
Definition at line 194 of file PolygonSymbolizer.h.
The documentation for this class was generated from the following file: