![]() |
Qt 6.x
The Qt SDK
|
#include <qdeclarativepolygonmapitem_p_p.h>
Public Types | |
enum | MapBorderBehaviour { DrawOnce , Duplicate , WrapAround } |
Protected Attributes | |
QPainterPath | srcPath_ |
qreal | maxCoord_ = 0.0 |
bool | assumeSimple_ = false |
![]() | |
bool | sourceDirty_ = true |
bool | screenDirty_ = true |
bool | clipToViewport_ = true |
bool | preserveGeometry_ = false |
QGeoCoordinate | geoLeftBound_ |
QPointF | firstPointOffset_ |
QPainterPath | screenOutline_ |
QRectF | sourceBounds_ |
QRectF | screenBounds_ |
QGeoCoordinate | srcOrigin_ |
QList< QPointF > | screenVertices_ |
QList< quint32 > | screenIndices_ |
Additional Inherited Members | |
![]() | |
static QList< QGeoCoordinate > | path (const QGeoRectangle &rect) |
static QList< QGeoCoordinate > | perimeter (const QGeoRectangle &rect) |
static QList< QDoubleVector2D > | pathMercator (const QList< QGeoCoordinate > &p) |
![]() | |
bool | m_dataChanged = false |
Definition at line 38 of file qdeclarativepolygonmapitem_p_p.h.
Enumerator | |
---|---|
DrawOnce | |
Duplicate | |
WrapAround |
Definition at line 41 of file qdeclarativepolygonmapitem_p_p.h.
|
default |
\qmltype MapPolygon \instantiates QDeclarativePolygonMapItem \inqmlmodule QtLocation
The MapPolygon type displays a polygon on a Map.
The MapPolygon type displays a polygon on a Map, specified in terms of an ordered list of \l {QtPositioning::coordinate}{coordinates}. For best appearance and results, polygons should be simple (not self-intersecting).
The \l {QtPositioning::coordinate}{coordinates} on the path cannot be directly changed after being added to the Polygon. Instead, copy the \l path into a var, modify the copy and reassign the copy back to the \l path.
Coordinates can also be added and removed at any time using the \l addCoordinate and \l removeCoordinate methods.
For drawing rectangles with "straight" edges (same latitude across one edge, same latitude across the other), the \l MapRectangle type provides a simpler, two-point API.
By default, the polygon is displayed as a 1 pixel black border with no fill. To change its appearance, use the \l color, \l border.color and \l border.width properties.
|
inline |
Definition at line 56 of file qdeclarativepolygonmapitem_p_p.h.
Referenced by QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), and QDeclarativeRectangleMapItemPrivateCPU::updatePolish().
|
inline |
Definition at line 49 of file qdeclarativepolygonmapitem_p_p.h.
|
inline |
Definition at line 55 of file qdeclarativepolygonmapitem_p_p.h.
Referenced by QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), and QDeclarativeRectangleMapItemPrivateCPU::updatePolish().
void QGeoMapPolygonGeometry::updateSourcePoints | ( | const QGeoMap & | map, |
const QList< QList< QDoubleVector2D > > & | basePaths, | ||
MapBorderBehaviour | wrapping = Duplicate |
||
) |
Definition at line 113 of file qdeclarativepolygonmapitem.cpp.
References QClipperUtils::addClipPolygon(), addPoint(), QClipperUtils::addSubjectPath(), QList< T >::append(), assumeSimple_, QPainterPath::boundingRect(), QDeclarativeGeoMapItemUtils::boundingRectangleFromList(), QPainterPath::closeSubpath(), QDeclarativeGeoMapItemUtils::distanceSqrPointLine(), DrawOnce, Duplicate, QClipperUtils::execute(), QList< T >::first(), i, QList< T >::insert(), QClipperUtils::Intersection, QRectF::intersects(), QList< T >::isEmpty(), j, QList< T >::last(), QRectF::left(), QList< T >::length(), QPainterPath::lineTo(), map, maxCoord_, QPainterPath::moveTo(), QGeoMapItemGeometry::origin(), QClipperUtils::pftEvenOdd, QList< T >::push_front(), qMax(), QList< T >::reserve(), QRectF::right(), QPainterPath::simplified(), QList< T >::size(), QGeoMapItemGeometry::sourceBounds_, QGeoMapItemGeometry::sourceDirty_, QGeoMapItemGeometry::srcOrigin_, srcPath_, QList< T >::swapItemsAt(), QRectF::top(), QDoubleVector2D::toPointF(), QRectF::translated(), WrapAround, QDoubleVector2D::x(), and QDoubleVector2D::y().
Referenced by QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), and QDeclarativeRectangleMapItemPrivateCPU::updatePolish().
|
protected |
Definition at line 61 of file qdeclarativepolygonmapitem_p_p.h.
Referenced by updateSourcePoints().
|
protected |
Definition at line 60 of file qdeclarativepolygonmapitem_p_p.h.
Referenced by updateSourcePoints().
|
protected |
Definition at line 59 of file qdeclarativepolygonmapitem_p_p.h.
Referenced by updateSourcePoints().