summaryrefslogtreecommitdiff
path: root/tests/baseline/mapitems/data/rectangle
diff options
context:
space:
mode:
Diffstat (limited to 'tests/baseline/mapitems/data/rectangle')
-rw-r--r--tests/baseline/mapitems/data/rectangle/rectangle_concentric1.qml54
-rw-r--r--tests/baseline/mapitems/data/rectangle/rectangle_concentric2.qml54
-rw-r--r--tests/baseline/mapitems/data/rectangle/rectangle_concentric3.qml54
-rw-r--r--tests/baseline/mapitems/data/rectangle/rectangle_grid1.qml53
-rw-r--r--tests/baseline/mapitems/data/rectangle/rectangle_grid2.qml70
5 files changed, 285 insertions, 0 deletions
diff --git a/tests/baseline/mapitems/data/rectangle/rectangle_concentric1.qml b/tests/baseline/mapitems/data/rectangle/rectangle_concentric1.qml
new file mode 100644
index 00000000..375337e1
--- /dev/null
+++ b/tests/baseline/mapitems/data/rectangle/rectangle_concentric1.qml
@@ -0,0 +1,54 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+import QtQuick
+import QtLocation
+import QtPositioning
+
+Map {
+ width: 512
+ height: 512
+
+ center: QtPositioning.coordinate(0, 50)
+
+ id: map
+ plugin: Plugin {
+ name: "osm"
+ }
+ zoomLevel: 1
+ copyrightsVisible: false
+
+ Repeater {
+ id: c
+ property var colors: [
+ "#30ff0000",
+ "#30ffa500",
+ "#30ffff00",
+ "#3000ff00",
+ "#300000ff",
+ "#30ee82ee"
+ ]
+ property int count: 20
+ model: count
+ MapRectangle
+ {
+ property int rWidth: ((c.count-index-1)/(c.count-1)*(180-5)+5)
+ property int rHeight: rWidth
+
+ topLeft
+ {
+ longitude: Math.min(180, Math.max(-180, 20 - rWidth/2))
+ latitude: Math.min(90, Math.max(-90, 20 - rHeight/2))
+ }
+ bottomRight
+ {
+ longitude: Math.min(180, Math.max(-180, 20 + rWidth/2))
+ latitude: Math.min(90, Math.max(-90, 20 + rHeight/2))
+ }
+ color: c.colors[Math.floor(index%c.colors.length)]
+ border.width: 1
+ autoFadeIn: false
+ opacity: 1
+ }
+ }
+}
diff --git a/tests/baseline/mapitems/data/rectangle/rectangle_concentric2.qml b/tests/baseline/mapitems/data/rectangle/rectangle_concentric2.qml
new file mode 100644
index 00000000..7e1b5b37
--- /dev/null
+++ b/tests/baseline/mapitems/data/rectangle/rectangle_concentric2.qml
@@ -0,0 +1,54 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+import QtQuick
+import QtLocation
+import QtPositioning
+
+Map {
+ width: 512
+ height: 512
+
+ center: QtPositioning.coordinate(0, 50)
+
+ id: map
+ plugin: Plugin {
+ name: "osm"
+ }
+ zoomLevel: 1
+ copyrightsVisible: false
+
+ Repeater {
+ id: c
+ property var colors: [
+ "#30ff0000",
+ "#30ffa500",
+ "#30ffff00",
+ "#3000ff00",
+ "#300000ff",
+ "#30ee82ee"
+ ]
+ property int count: 20
+ model: count
+ MapRectangle
+ {
+ property int rWidth: ((c.count-index-1)/(c.count-1)*(180-5)+5)
+ property int rHeight: rWidth
+
+ topLeft
+ {
+ longitude: Math.min(180, Math.max(-180, 20 - rWidth/2))
+ latitude: Math.min(90, Math.max(-90, -20 - rHeight/2))
+ }
+ bottomRight
+ {
+ longitude: Math.min(180, Math.max(-180, 20 + rWidth/2))
+ latitude: Math.min(90, Math.max(-90, -20 + rHeight/2))
+ }
+ color: c.colors[Math.floor(index%c.colors.length)]
+ border.width: 1
+ autoFadeIn: false
+ opacity: 1
+ }
+ }
+}
diff --git a/tests/baseline/mapitems/data/rectangle/rectangle_concentric3.qml b/tests/baseline/mapitems/data/rectangle/rectangle_concentric3.qml
new file mode 100644
index 00000000..39582127
--- /dev/null
+++ b/tests/baseline/mapitems/data/rectangle/rectangle_concentric3.qml
@@ -0,0 +1,54 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+import QtQuick
+import QtLocation
+import QtPositioning
+
+Map {
+ width: 512
+ height: 512
+
+ center: QtPositioning.coordinate(0, 47.4)
+
+ id: map
+ plugin: Plugin {
+ name: "osm"
+ }
+ zoomLevel: 1
+ copyrightsVisible: false
+
+ Repeater {
+ id: c
+ property var colors: [
+ "#30ff0000",
+ "#30ffa500",
+ "#30ffff00",
+ "#3000ff00",
+ "#300000ff",
+ "#30ee82ee"
+ ]
+ property int count: 20
+ model: count
+ MapRectangle
+ {
+ property int rHeight: ((c.count-index-1)/(c.count-1)*(180-5)+5)
+ property int rWidth: rHeight*5
+
+ topLeft
+ {
+ longitude: Math.min(175, Math.max(-180, 20 - rWidth/2))
+ latitude: Math.min(90, Math.max(-90, 20 - rHeight/2))
+ }
+ bottomRight
+ {
+ longitude: Math.min(175, Math.max(-180, 20 + rWidth/2))
+ latitude: Math.min(90, Math.max(-90, 20 + rHeight/2))
+ }
+ color: c.colors[Math.floor(index%c.colors.length)]
+ border.width: 1
+ autoFadeIn: false
+ opacity: 1
+ }
+ }
+}
diff --git a/tests/baseline/mapitems/data/rectangle/rectangle_grid1.qml b/tests/baseline/mapitems/data/rectangle/rectangle_grid1.qml
new file mode 100644
index 00000000..1a74c003
--- /dev/null
+++ b/tests/baseline/mapitems/data/rectangle/rectangle_grid1.qml
@@ -0,0 +1,53 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+import QtQuick
+import QtLocation
+import QtPositioning
+
+Map {
+ width: 512
+ height: 512
+
+ center: QtPositioning.coordinate(0, 30)
+
+ id: map
+ plugin: Plugin {
+ name: "osm"
+ }
+ zoomLevel: 1
+ copyrightsVisible: false
+
+ Repeater {
+ id: c
+ property var colors: [
+ "red",
+ "orange",
+ "yellow",
+ "green",
+ "blue",
+ "violet"
+ ]
+ property double rWidth: 15
+ property double rHeight: 15
+ property int count: c.colors.length
+ model: count*count
+ MapRectangle
+ {
+ topLeft
+ {
+ longitude: Math.min(180, Math.max(-180, -180+360*(index%c.count+0.5)/(c.count) - c.rWidth/2))
+ latitude: Math.min(90, Math.max(-90, -90+180*(Math.floor(index/c.count)+0.5)/(c.count) - c.rHeight/2))
+ }
+ bottomRight
+ {
+ longitude: Math.min(180, Math.max(-180, -180+360*(index%c.count+0.5)/(c.count) + c.rWidth/2))
+ latitude: Math.min(90, Math.max(-90, -90+180*(Math.floor(index/c.count)+0.5)/(c.count) + c.rHeight/2))
+ }
+ color: c.colors[Math.floor(index%c.colors.length)]
+ border.width: 1
+ autoFadeIn: false
+ opacity: 0.3
+ }
+ }
+}
diff --git a/tests/baseline/mapitems/data/rectangle/rectangle_grid2.qml b/tests/baseline/mapitems/data/rectangle/rectangle_grid2.qml
new file mode 100644
index 00000000..29f0f8a0
--- /dev/null
+++ b/tests/baseline/mapitems/data/rectangle/rectangle_grid2.qml
@@ -0,0 +1,70 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+import QtQuick
+import QtLocation
+import QtPositioning
+
+Map {
+ width: 512
+ height: 512
+
+ center: QtPositioning.coordinate(0, 20)
+
+ id: map
+ plugin: Plugin {
+ name: "osm"
+ }
+ zoomLevel: 1
+ copyrightsVisible: false
+
+ Repeater {
+ id: c
+ property double rWidth: 70
+ property double rHeight: 50
+ property int count: 4
+ model: count*count
+ MapRectangle
+ {
+ topLeft
+ {
+ longitude: Math.min(180, Math.max(-180, -180+360*(index%c.count+0.5)/(c.count) - c.rWidth/2))
+ latitude: Math.min(90, Math.max(-90, -90+180*(Math.floor(index/c.count)+0.5)/(c.count) - c.rHeight/2))
+ }
+ bottomRight
+ {
+ longitude: Math.min(180, Math.max(-180, -180+360*(index%c.count+0.5)/(c.count) + c.rWidth/2))
+ latitude: Math.min(90, Math.max(-90, -90+180*(Math.floor(index/c.count)+0.5)/(c.count) + c.rHeight/2))
+ }
+ color: 'green'
+ border.width: 1
+ autoFadeIn: false
+ opacity: 0.3
+ }
+ }
+
+ Repeater {
+ id: c2
+ property double rWidth: 40
+ property double rHeight: 40
+ property int count: 4
+ model: count*count
+ MapRectangle
+ {
+ topLeft
+ {
+ longitude: Math.min(180, Math.max(-180, -180+360*(index%c2.count+0.5)/(c2.count) - c2.rWidth/2))
+ latitude: Math.min(90, Math.max(-90, -90+180*(Math.floor(index/c2.count)+0.5)/(c2.count) - c2.rHeight/2))
+ }
+ bottomRight
+ {
+ longitude: Math.min(180, Math.max(-180, -180+360*(index%c2.count+0.5)/(c2.count) + c2.rWidth/2))
+ latitude: Math.min(90, Math.max(-90, -90+180*(Math.floor(index/c2.count)+0.5)/(c2.count) + c2.rHeight/2))
+ }
+ color: 'blue'
+ border.width: 1
+ autoFadeIn: false
+ opacity: 0.3
+ }
+ }
+}