te::se::Graphic Class Reference

A Graphic is a graphic symbol with an inherent shape, color(s), and possibly size. More...

#include <Graphic.h>

Inheritance diagram for te::se::Graphic:

Public Member Functions

Graphicclone () const
 It creates a new copy of this object. More...
 
Initializer Methods

Methods related to instantiation and destruction.

 Graphic ()
 It initializes a new Graphic. More...
 
 ~Graphic ()
 Destructor. More...
 
Accessor methods

Methods used to get or set properties.

void add (ExternalGraphic *g)
 Graphics can either be referenced from an external URL in a common format (such as GIF or SVG). Multiple external URLs and marks may be referenced with the semantic that they all provide the equivalent graphic in different formats. The "hot spot" to use for positioning the rendering at a point must either be inherent in the external format or is defined to be the "central point" of the graphic, where the exact definition "central point" is system-dependent. More...
 
void setExternalGraphic (std::size_t index, ExternalGraphic *g)
 
const std::vector< ExternalGraphic * > getExternalGraphics () const
 
void add (Mark *m)
 
void setMark (std::size_t index, Mark *m)
 
const std::vector< Mark * > getMarks () const
 
void setOpacity (ParameterValue *value)
 The Opacity element gives the opacity to use for rendering the graphic. It has the same semantics as the "stroke-opacity" and "fill-opacity" SvgParameter. The default value is 1.0. More...
 
const ParameterValuegetOpacity () const
 
void setSize (ParameterValue *value)
 The Size element gives the absolute size of the graphic in uoms encoded as a floating-point number. The default size for an object is context-dependent. Negative values are not allowed. More...
 
const ParameterValuegetSize () const
 
void setRotation (ParameterValue *value)
 The Rotation element gives the rotation of a graphic in the clockwise direction about its center point in decimal degrees, encoded as a floating-point number. Negative values mean counter-clockwise rotation. The default value is 0.0 (no rotation). Note that there is no connection between source geometry types and rotations; the point used for plotting has no inherent direction. Also, the point within the graphic about which it is rotated is format dependent. If a format does not include an inherent rotation point, then the point of rotation should be the centroid. More...
 
const ParameterValuegetRotation () const
 
void setAnchorPoint (AnchorPoint *value)
 
const AnchorPointgetAnchorPoint () const
 
void setDisplacement (Displacement *value)
 
const DisplacementgetDisplacement () const
 
void clear ()
 Clears the marks and the external graphics of this graphic. More...
 

Private Attributes

AnchorPointm_anchorPoint
 The AnchorPoint element of a PointSymbolizer gives the location inside of a Graphic to use for anchoring the graphic to the main-geometry point. (Optional) More...
 
Displacementm_displacement
 The Displacement gives the X and Y displacements from the "hot-spot" point. (Optional) More...
 
std::vector< ExternalGraphic * > m_externalGraphics
 An ExternalGraphic gives a reference to a raster or vector graphical object, either online or inline, in an externally-defined graphic format. (Optional) More...
 
std::vector< Mark * > m_marks
 A Mark specifies a geometric shape and applies coloring to it. (Optional) More...
 
ParameterValuem_opacity
 The Opacity element gives the opacity to use for rendering the graphic. (Optional) More...
 
ParameterValuem_rotation
 The Rotation element gives the rotation of a graphic in the clockwise direction about its center point in decimal degrees, encoded as a floating-point number. Negative values mean counter-clockwise rotation. (Optional) More...
 
ParameterValuem_size
 The Size element gives the absolute size of the graphic in uoms encoded as a floating-point number. (Optional) More...
 

Detailed Description

A Graphic is a graphic symbol with an inherent shape, color(s), and possibly size.

A graphic can be defined very informally as "a little picture" and can be of either a raster or vector-graphic source type. The default if neither an ExternalGraphic nor a Mark is specified is to use the default mark of a "square" with a 50%-gray fill and a black outline, with a size of 6 pixels, unless an explicit Size is specified.

See also
Rule, PointSymbolizer, Stroke, GraphicStroke, Mark, ExternalGraphic, Displacement, ParameterValue, AnchorPoint

Definition at line 66 of file Graphic.h.

Constructor & Destructor Documentation

te::se::Graphic::Graphic ( )

It initializes a new Graphic.

te::se::Graphic::~Graphic ( )

Destructor.

Member Function Documentation

void te::se::Graphic::add ( ExternalGraphic g)

Graphics can either be referenced from an external URL in a common format (such as GIF or SVG). Multiple external URLs and marks may be referenced with the semantic that they all provide the equivalent graphic in different formats. The "hot spot" to use for positioning the rendering at a point must either be inherent in the external format or is defined to be the "central point" of the graphic, where the exact definition "central point" is system-dependent.

void te::se::Graphic::add ( Mark m)
void te::se::Graphic::clear ( )

Clears the marks and the external graphics of this graphic.

Graphic* te::se::Graphic::clone ( ) const

It creates a new copy of this object.

const AnchorPoint* te::se::Graphic::getAnchorPoint ( ) const
const Displacement* te::se::Graphic::getDisplacement ( ) const
const std::vector<ExternalGraphic*> te::se::Graphic::getExternalGraphics ( ) const
const std::vector<Mark*> te::se::Graphic::getMarks ( ) const
const ParameterValue* te::se::Graphic::getOpacity ( ) const
const ParameterValue* te::se::Graphic::getRotation ( ) const
const ParameterValue* te::se::Graphic::getSize ( ) const
void te::se::Graphic::setAnchorPoint ( AnchorPoint value)
void te::se::Graphic::setDisplacement ( Displacement value)
void te::se::Graphic::setExternalGraphic ( std::size_t  index,
ExternalGraphic g 
)
void te::se::Graphic::setMark ( std::size_t  index,
Mark m 
)
void te::se::Graphic::setOpacity ( ParameterValue value)

The Opacity element gives the opacity to use for rendering the graphic. It has the same semantics as the "stroke-opacity" and "fill-opacity" SvgParameter. The default value is 1.0.

void te::se::Graphic::setRotation ( ParameterValue value)

The Rotation element gives the rotation of a graphic in the clockwise direction about its center point in decimal degrees, encoded as a floating-point number. Negative values mean counter-clockwise rotation. The default value is 0.0 (no rotation). Note that there is no connection between source geometry types and rotations; the point used for plotting has no inherent direction. Also, the point within the graphic about which it is rotated is format dependent. If a format does not include an inherent rotation point, then the point of rotation should be the centroid.

void te::se::Graphic::setSize ( ParameterValue value)

The Size element gives the absolute size of the graphic in uoms encoded as a floating-point number. The default size for an object is context-dependent. Negative values are not allowed.

The default size of an image format (such as GIF) is the inherent size of the image. The default size of a format without an inherent size (such as SVG which are not specially marked) is defined to be 16 pixels in height and the corresponding aspect in width. If a size is specified, the height of the graphic will be scaled to that size and the corresponding aspect will be used for the width. An expected common use case will be for image graphics to be on the order of 200 pixels in linear size and to be scaled to lower sizes. On systems that can resample these graphic images "smoothly", the results will be visually pleasing.

Member Data Documentation

AnchorPoint* te::se::Graphic::m_anchorPoint
private

The AnchorPoint element of a PointSymbolizer gives the location inside of a Graphic to use for anchoring the graphic to the main-geometry point. (Optional)

Definition at line 198 of file Graphic.h.

Displacement* te::se::Graphic::m_displacement
private

The Displacement gives the X and Y displacements from the "hot-spot" point. (Optional)

Definition at line 199 of file Graphic.h.

std::vector<ExternalGraphic*> te::se::Graphic::m_externalGraphics
private

An ExternalGraphic gives a reference to a raster or vector graphical object, either online or inline, in an externally-defined graphic format. (Optional)

Definition at line 193 of file Graphic.h.

std::vector<Mark*> te::se::Graphic::m_marks
private

A Mark specifies a geometric shape and applies coloring to it. (Optional)

Definition at line 194 of file Graphic.h.

ParameterValue* te::se::Graphic::m_opacity
private

The Opacity element gives the opacity to use for rendering the graphic. (Optional)

Definition at line 195 of file Graphic.h.

ParameterValue* te::se::Graphic::m_rotation
private

The Rotation element gives the rotation of a graphic in the clockwise direction about its center point in decimal degrees, encoded as a floating-point number. Negative values mean counter-clockwise rotation. (Optional)

Definition at line 197 of file Graphic.h.

ParameterValue* te::se::Graphic::m_size
private

The Size element gives the absolute size of the graphic in uoms encoded as a floating-point number. (Optional)

Definition at line 196 of file Graphic.h.


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