A Graphic is a graphic symbol with an inherent shape, color(s), and possibly size. More...
#include <Graphic.h>
Public Member Functions | |
Graphic * | clone () 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 ParameterValue * | getOpacity () 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 ParameterValue * | getSize () 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 ParameterValue * | getRotation () const |
void | setAnchorPoint (AnchorPoint *value) |
const AnchorPoint * | getAnchorPoint () const |
void | setDisplacement (Displacement *value) |
const Displacement * | getDisplacement () const |
void | clear () |
Clears the marks and the external graphics of this graphic. More... | |
Private Attributes | |
AnchorPoint * | m_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... | |
Displacement * | m_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... | |
ParameterValue * | m_opacity |
The Opacity element gives the opacity to use for rendering the graphic. (Optional) More... | |
ParameterValue * | m_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... | |
ParameterValue * | m_size |
The Size element gives the absolute size of the graphic in uoms encoded as a floating-point number. (Optional) More... | |
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.
te::se::Graphic::Graphic | ( | ) |
It initializes a new Graphic.
Definition at line 38 of file Graphic.cpp.
te::se::Graphic::~Graphic | ( | ) |
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.
Definition at line 59 of file Graphic.cpp.
Referenced by clone(), te::se::CreateGraphic(), te::qt::widgets::GlyphGraphicWidget::GlyphGraphicWidget(), te::qt::widgets::GraphicProperty::GraphicProperty(), te::qt::widgets::LocalGraphicWidget::LocalGraphicWidget(), te::qt::widgets::ScatterStyle::ScatterStyle(), and te::qt::widgets::WellKnownGraphicWidget::WellKnownGraphicWidget().
void te::se::Graphic::add | ( | Mark * | m | ) |
Definition at line 81 of file Graphic.cpp.
void te::se::Graphic::clear | ( | void | ) |
Clears the marks and the external graphics of this graphic.
Definition at line 158 of file Graphic.cpp.
References te::common::FreeContents().
te::se::Graphic * te::se::Graphic::clone | ( | ) | const |
It creates a new copy of this object.
Definition at line 167 of file Graphic.cpp.
References add(), te::se::ExternalGraphic::clone(), te::se::Mark::clone(), setAnchorPoint(), setDisplacement(), setOpacity(), setRotation(), and setSize().
Referenced by te::se::Fill::clone(), te::se::Stroke::clone(), te::qt::widgets::ChartConfigurer::config(), te::qt::widgets::GraphicPropertyItem::getGraphic(), te::qt::widgets::AbstractGraphicWidget::getGraphic(), te::qt::widgets::GraphicProperty::getGraphic(), te::se::PointSymbolizer::PointSymbolizer(), te::qt::widgets::GraphicPropertyItem::setGraphic(), te::qt::widgets::WellKnownGraphicWidget::setGraphic(), te::qt::widgets::LocalGraphicWidget::setGraphic(), te::qt::widgets::GlyphGraphicWidget::setGraphic(), and te::qt::widgets::GraphicProperty::setGraphic().
const te::se::AnchorPoint * te::se::Graphic::getAnchorPoint | ( | ) | const |
Definition at line 142 of file Graphic.cpp.
Referenced by te::se::serialize::Save().
const te::se::Displacement * te::se::Graphic::getDisplacement | ( | ) | const |
Definition at line 153 of file Graphic.cpp.
Referenced by te::se::serialize::Save().
const std::vector< te::se::ExternalGraphic * > te::se::Graphic::getExternalGraphics | ( | ) | const |
Definition at line 76 of file Graphic.cpp.
Referenced by te::map::CanvasConfigurer::config(), te::se::serialize::Save(), te::qt::widgets::LocalGraphicWidget::setGraphic(), and te::qt::widgets::Terralib2Qwt().
const std::vector< te::se::Mark * > te::se::Graphic::getMarks | ( | ) | const |
Definition at line 98 of file Graphic.cpp.
Referenced by te::map::CanvasConfigurer::config(), te::se::serialize::Save(), te::qt::widgets::WellKnownGraphicWidget::setGraphic(), te::qt::widgets::GlyphGraphicWidget::setGraphic(), te::qt::widgets::GraphicProperty::setGraphic(), te::qt::widgets::Terralib2Qwt(), and te::se::SymbolizerColorFinder::visit().
const te::se::ParameterValue * te::se::Graphic::getOpacity | ( | ) | const |
Definition at line 109 of file Graphic.cpp.
Referenced by te::map::CanvasConfigurer::config(), te::qt::widgets::GraphicProperty::onGraphicPropertyChanged(), and te::se::serialize::Save().
const te::se::ParameterValue * te::se::Graphic::getRotation | ( | ) | const |
Definition at line 131 of file Graphic.cpp.
Referenced by te::map::CanvasConfigurer::config(), te::qt::widgets::GraphicProperty::onGraphicPropertyChanged(), and te::se::serialize::Save().
const te::se::ParameterValue * te::se::Graphic::getSize | ( | ) | const |
Definition at line 120 of file Graphic.cpp.
Referenced by te::map::CanvasConfigurer::config(), te::qt::widgets::GraphicProperty::onGraphicPropertyChanged(), te::se::serialize::Save(), and te::qt::widgets::Terralib2Qwt().
void te::se::Graphic::setAnchorPoint | ( | AnchorPoint * | value | ) |
Definition at line 136 of file Graphic.cpp.
Referenced by clone().
void te::se::Graphic::setDisplacement | ( | Displacement * | value | ) |
Definition at line 147 of file Graphic.cpp.
Referenced by clone().
void te::se::Graphic::setExternalGraphic | ( | std::size_t | index, |
ExternalGraphic * | g | ||
) |
Definition at line 65 of file Graphic.cpp.
void te::se::Graphic::setMark | ( | std::size_t | index, |
Mark * | m | ||
) |
Definition at line 87 of file Graphic.cpp.
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.
Definition at line 103 of file Graphic.cpp.
Referenced by clone(), and te::se::CreateGraphic().
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.
Definition at line 125 of file Graphic.cpp.
Referenced by clone(), and te::se::CreateGraphic().
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.
Definition at line 114 of file Graphic.cpp.
Referenced by clone(), te::se::CreateGraphic(), te::qt::widgets::GraphicProperty::onGraphicPropertyChanged(), and te::qt::widgets::ScatterStyle::ScatterStyle().
|
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)
|
private |
The Displacement gives the X and Y displacements from the "hot-spot" point. (Optional)
|
private |
An ExternalGraphic gives a reference to a raster or vector graphical object, either online or inline, in an externally-defined graphic format. (Optional)
|
private |
|
private |
|
private |
|
private |