1/****************************************************************************
3 * (c) 2009-2024 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
5 * QGroundControl is licensed according to the terms in the file
6 * COPYING.md in the root of the source code directory.
8 ****************************************************************************/
14import QGroundControl.GeoMap
16/// Circle outline only; GeoMapCircleVisuals is the full QGCMapCircleVisuals
17/// counterpart (adds drag handles and rotation arrows). Built from
18/// great-circle points so it stays correct under 3D
19/// camera tilt. Ground-projected by default; set altitudeMode to
20/// GeoMapItem.Absolute to render at the center coordinate's altitude.
21/// Set extrudeHeightMeters to also render a 3D fence wall from the terrain
22/// up to that AGL height (visible in 3D mode only; flattens away in 2D).
27 property var surfaceModel
28 property var center ///< QGeoCoordinate
29 property real radiusMeters: 0
30 property color strokeColor: QGroundControl.globalPalette.mapMissionTrajectory
31 property real strokeWidth: 3
32 property color fillColor: "transparent"
33 property real extrudeHeightMeters: 0 ///< 0 = flat outline only
34 property color extrudeColor: Qt.alpha(strokeColor, 0.25)
35 property alias altitudeMode: pathProjector.altitudeMode
40 surfaceModel: root.surfaceModel
41 // Skip the projection work entirely while hidden
42 coordinates: (root.visible && root.center && root.center.isValid && root.radiusMeters > 0)
43 ? pathProjector.circleCoordinates(root.center, root.radiusMeters)
48 visible: pathProjector.projected
51 strokeColor: root.strokeColor
52 strokeWidth: root.strokeWidth
53 fillColor: root.fillColor
54 PathPolyline { path: pathProjector.screenPoints }
60 visible: root.visible && root.extrudeHeightMeters > 0
62 surfaceModel: root.surfaceModel
63 heightAglMeters: root.extrudeHeightMeters
64 color: root.extrudeColor
65 // Skip the ring construction entirely while hidden
66 coordinates: (wallItem.visible && root.center && root.center.isValid && root.radiusMeters > 0)
67 ? pathProjector.circleCoordinates(root.center, root.radiusMeters)