27 #include "../../../geometry/Geometry.h" 28 #include "../../../geometry/Utils.h" 29 #include "../canvas/Canvas.h" 30 #include "../canvas/MapDisplay.h" 34 #include <QMouseEvent> 41 m_actionCursor(actionCursor)
45 m_pen.setColor(QColor(0, 0, 0));
47 m_brush = QColor(233, 88, 63, 80);
54 if(e->button() != Qt::LeftButton)
78 auxExt.
m_llx = p.x() - w;
79 auxExt.
m_lly = p.y() - h;
80 auxExt.
m_urx = p.x() + w;
81 auxExt.
m_ury = p.y() + h;
110 canvasInstance.setWindow(mapExt.m_llx, mapExt.m_lly, mapExt.m_urx, mapExt.m_ury);
112 canvasInstance.setPolygonContourColor(
m_pen.color().rgba());
113 canvasInstance.setPolygonContourWidth(
m_pen.width());
114 canvasInstance.setPolygonFillColor(
m_brush.color().rgba());
118 canvasInstance.draw(geom);
double m_urx
Upper right corner x-coordinate.
double getWidth() const
It returns the envelope width.
double m_llx
Lower left corner x-coordinate.
An Envelope defines a 2D rectangular region.
virtual int getSRID() const
It return the Spatial Reference System used by the Map Display.
virtual const te::gm::Envelope & getExtent() const
It returns the world extent showned by the MapDisplay.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
double m_lly
Lower left corner y-coordinate.
double m_ury
Upper right corner y-coordinate.
double getHeight() const
It returns the envelope height.
This class implements a concrete tool to pan a user defined extent.
TEGEOMEXPORT Geometry * GetGeomFromEnvelope(const Envelope *const e, int srid)
It creates a Geometry (a polygon) from the given envelope.