diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-07-11 15:55:27 +0200 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-08-04 11:19:14 +0000 |
commit | 92d8e4dc93400250b47f8dbe96ec7e2f748d8d4b (patch) | |
tree | 0545f115d23f74be1979ec483a63f19bbc9b1d55 /src/3rdparty/clip2tri | |
parent | 4511bc9b9bc85a0021ce59feab1a28c711dec691 (diff) | |
download | qtlocation-92d8e4dc93400250b47f8dbe96ec7e2f748d8d4b.tar.gz |
Add QGeoPolygon to QtPositioning
This patch introduces a new QGeoShape, QGeoPolygon, together
with helper functions in the location singleton (QtPositioning.*)
to create and convert geopolygons from QML.
[ChangeLog][QtPositioning][QGeoPolygon] Added QGeoPolygon shape.
Change-Id: I111c576d7428f2a953f0459d16c25eea7ab2bd7c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/3rdparty/clip2tri')
-rw-r--r-- | src/3rdparty/clip2tri/clip2tri.cpp | 5 | ||||
-rw-r--r-- | src/3rdparty/clip2tri/clip2tri.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/3rdparty/clip2tri/clip2tri.cpp b/src/3rdparty/clip2tri/clip2tri.cpp index e715d1c7..db4911c1 100644 --- a/src/3rdparty/clip2tri/clip2tri.cpp +++ b/src/3rdparty/clip2tri/clip2tri.cpp @@ -173,6 +173,11 @@ Paths clip2tri::execute(const clip2tri::Operation op, const PolyFillType subjFil return solution; } +int clip2tri::pointInPolygon(const IntPoint &pt, const Path &path) +{ + return PointInPolygon(pt, path); +} + Path clip2tri::upscaleClipperPoints(const vector<Point> &inputPolygon) { Path outputPolygon; diff --git a/src/3rdparty/clip2tri/clip2tri.h b/src/3rdparty/clip2tri/clip2tri.h index 61c8a0f5..3848d009 100644 --- a/src/3rdparty/clip2tri/clip2tri.h +++ b/src/3rdparty/clip2tri/clip2tri.h @@ -91,6 +91,8 @@ public: const PolyFillType subjFillType = pftNonZero, const PolyFillType clipFillType = pftNonZero); + static int pointInPolygon(const IntPoint &pt, const Path &path); + Clipper clipper; bool openSubject; }; |