27 #include "../../../common/STLUtils.h" 28 #include "../../../geometry/Envelope.h" 29 #include "../../../geometry/Geometry.h" 30 #include "../../../geometry/LinearRing.h" 31 #include "../../../geometry/Polygon.h" 32 #include "../canvas/Canvas.h" 33 #include "../canvas/MapDisplay.h" 37 #include <QMouseEvent> 51 m_pen.setColor(QColor(0, 0, 0));
53 m_brush = QColor(233, 88, 63, 80);
62 draft->fill(Qt::transparent);
67 if(e->button() != Qt::LeftButton)
87 #if QT_VERSION >= 0x050000 94 #if QT_VERSION >= 0x050000 95 QPointF pos = e->localPos() + QPointF(0.0001, 0.0001);
97 QPointF pos = e->posF() + QPointF(0.0001, 0.0001);
115 if(e->button() != Qt::LeftButton)
125 for(std::size_t i = 0; i <
m_coords.size(); ++i)
146 draft->fill(Qt::transparent);
152 canvas.setRenderHint(QPainter::Antialiasing,
true);
166 for(std::size_t i = 0; i <
m_coords.size(); ++i)
186 for(std::size_t i = 0; i <
m_coords.size(); ++i)
199 canvas.
draw(polygon);
209 draft->fill(Qt::transparent);
void setSRID(int srid)
It sets the Spatial Reference System ID of the geometry and all its parts if it is a GeometryCollecti...
double m_urx
Upper right corner x-coordinate.
An utility struct for representing 2D coordinates.
A LinearRing is a LineString that is both closed and simple.
double m_llx
Lower left corner x-coordinate.
LineString is a curve with linear interpolation between points.
void setPoint(std::size_t i, const double &x, const double &y)
It sets the value of the specified point.
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.
This class implements a concrete tool to acquire a polygon geometry.
double m_lly
Lower left corner y-coordinate.
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
double m_ury
Upper right corner y-coordinate.
bool isValid() const
It tells if the rectangle is valid or not.
void setRingN(std::size_t i, Curve *r)
It sets the informed position ring to the new one.