It renders the objects associated to a Layer. More...
#include <LayerRenderer.h>
Public Member Functions | |
Initializer Methods | |
Methods related to instantiation and destruction. | |
| LayerRenderer () | |
| ~LayerRenderer () | |
| Destructor. More... | |
Implementation of Pure Virtual Methods from AbstractLayer | |
Every subclass must implent this interface. | |
| virtual void | draw (te::map::AbstractLayer *layer, te::map::Canvas *canvas, const te::gm::Envelope &bbox, int srid, const double &scale, bool *cancel) |
| It draws the layer geographic objects in the given canvas using the informed SRS. More... | |
Protected Member Functions | |
| int | checkEdgeGeometryProperty (te::graph::AbstractGraph *g) |
| Verify if the graph layer has a geometry to define the edges elements. More... | |
| int | checkVertexGeometryProperty (te::graph::AbstractGraph *g) |
| Verify if the graph layer has a geometry to define the vertexs elements. More... | |
| void | configDefaultLine (te::map::Canvas *canvas) |
| Configs the canvas with default values for line styles. More... | |
| void | configDefaultPoint (te::map::Canvas *canvas) |
| Configs the canvas with default values for point styles. More... | |
| void | configLoopPoint (te::map::Canvas *canvas) |
| Configs the canvas with default values for point styles. More... | |
| void | drawDataSourceGraph (te::graph::AbstractGraph *g, te::map::Canvas *canvas, const te::gm::Envelope &bbox) |
| void | drawMemoryGraph (te::graph::AbstractGraph *g, te::map::Canvas *canvas, const te::gm::Envelope &bbox, int srid) |
Private Member Functions | |
Copy Constructor and Assignment Operator | |
Copy constructor and assignment operator not allowed. | |
| LayerRenderer (const LayerRenderer &rhs) | |
| Copy constructor not allowed. More... | |
| LayerRenderer & | operator= (const LayerRenderer &rhs) |
| Assignment operator not allowed. More... | |
It renders the objects associated to a Layer.
Definition at line 57 of file LayerRenderer.h.
|
default |
Constructor
|
default |
Destructor.
|
private |
Copy constructor not allowed.
| rhs | The right-hand-side copy that would be used to copy from. |
|
protected |
Verify if the graph layer has a geometry to define the edges elements.
Definition at line 119 of file LayerRenderer.cpp.
References te::dt::GEOMETRY_TYPE, te::graph::AbstractGraph::getEdgeProperty(), te::graph::AbstractGraph::getEdgePropertySize(), te::dt::Property::getType(), and p.
Referenced by drawDataSourceGraph(), and drawMemoryGraph().
|
protected |
Verify if the graph layer has a geometry to define the vertexs elements.
Definition at line 102 of file LayerRenderer.cpp.
References te::dt::GEOMETRY_TYPE, te::dt::Property::getType(), te::graph::AbstractGraph::getVertexProperty(), te::graph::AbstractGraph::getVertexPropertySize(), and p.
Referenced by drawDataSourceGraph(), and drawMemoryGraph().
|
protected |
Configs the canvas with default values for line styles.
Definition at line 136 of file LayerRenderer.cpp.
References te::map::ButtCap, te::map::MiterJoin, te::map::Canvas::setLineCapStyle(), te::map::Canvas::setLineColor(), te::map::Canvas::setLineDashStyle(), te::map::Canvas::setLineJoinStyle(), te::map::Canvas::setLineWidth(), te::map::SolidLine, TE_OPAQUE, TE_SE_DEFAULT_STROKE_BASIC_COLOR, and TE_SE_DEFAULT_STROKE_BASIC_WIDTH.
Referenced by draw().
|
protected |
Configs the canvas with default values for point styles.
Definition at line 145 of file LayerRenderer.cpp.
References te::se::CreateFill(), te::se::CreateMark(), te::se::CreateStroke(), te::common::Free(), te::common::Singleton< MarkRendererManager >::getInstance(), te::map::Canvas::setPointColor(), te::map::Canvas::setPointPattern(), and TE_TRANSPARENT.
Referenced by draw().
|
protected |
Configs the canvas with default values for point styles.
Definition at line 157 of file LayerRenderer.cpp.
References te::se::CreateFill(), te::se::CreateMark(), te::se::CreateStroke(), te::common::Free(), te::common::Singleton< MarkRendererManager >::getInstance(), te::map::Canvas::setPointColor(), te::map::Canvas::setPointPattern(), and TE_TRANSPARENT.
|
virtual |
It draws the layer geographic objects in the given canvas using the informed SRS.
The informed bounding box (bbox) is used to constraint the Layer objects to be drawn. The bbox coordinates must be in the Spatial Reference System given by srid.
| layer | The layer to be rendered. |
| canvas | The canvas were the layer objects will be drawn. |
| bbox | The interest area to render the map. |
| srid | The SRS to be used to draw the layer objects. |
Implements te::map::AbstractRenderer.
Definition at line 54 of file LayerRenderer.cpp.
References te::map::CanvasConfigurer::config(), configDefaultLine(), configDefaultPoint(), drawDataSourceGraph(), drawMemoryGraph(), te::graph::GraphMetadata::getDataSource(), te::graph::Layer::getGraph(), te::graph::AbstractGraph::getMetadata(), te::se::Style::getRule(), te::se::Style::getRules(), te::map::AbstractLayer::getStyle(), te::se::Rule::getSymbolizers(), and te::gm::Envelope::isValid().
|
protected |
Definition at line 169 of file LayerRenderer.cpp.
References checkEdgeGeometryProperty(), checkVertexGeometryProperty(), te::map::Canvas::draw(), te::graph::Vertex::getAttributes(), te::graph::Edge::getAttributes(), te::graph::BoxIterator::getFirstEdge(), te::graph::Vertex::getId(), te::graph::Edge::getIdFrom(), te::graph::Edge::getIdTo(), te::graph::AbstractIterator::getNextEdge(), te::graph::AbstractGraph::getVertex(), te::gm::Point::getX(), te::gm::Point::getY(), te::graph::AbstractIterator::isEdgeIteratorAfterEnd(), line, te::gm::LineStringType, and te::gm::LineString::setPoint().
Referenced by draw().
|
protected |
Definition at line 249 of file LayerRenderer.cpp.
References checkEdgeGeometryProperty(), checkVertexGeometryProperty(), te::map::Canvas::draw(), te::graph::Vertex::getAttributes(), te::graph::Edge::getAttributes(), te::graph::MemoryIterator::getFirstEdge(), te::gm::GetGeomFromEnvelope(), te::graph::Vertex::getId(), te::graph::Edge::getIdFrom(), te::graph::Edge::getIdTo(), te::graph::MemoryIterator::getNextEdge(), te::graph::AbstractGraph::getVertex(), te::gm::Point::getX(), te::gm::Point::getY(), te::graph::MemoryIterator::isEdgeIteratorAfterEnd(), line, te::gm::LineStringType, te::gm::LineString::setPoint(), and te::gm::Geometry::within().
Referenced by draw().
|
private |
Assignment operator not allowed.
| rhs | The right-hand-side copy that would be used to copy from. |