Skip to content

Commit

Permalink
Add render-tests for line-dasharray case (#9525)
Browse files Browse the repository at this point in the history
Trick to mimic an outline with a different color.
  • Loading branch information
tmpsantos authored Apr 9, 2020
1 parent 3de1b9f commit 2622b14
Show file tree
Hide file tree
Showing 6 changed files with 222 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 70 additions & 0 deletions test/integration/render-tests/line-dasharray/case/butt/style.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"version": 8,
"metadata": {
"test": {
"height": 200,
"width": 200
}
},
"center": [
0.0,
0.0
],
"zoom": 15,
"sources": {
"geojson": {
"type": "geojson",
"data": {
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
-0.001,
-0.001
],
[
0.001,
0.001
]
]
}
}
}
},
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
{
"id": "case",
"type": "line",
"source": "geojson",
"paint": {
"line-color": "blue",
"line-dasharray": [
1.666666,
1.666666
],
"line-width": 12
}
},
{
"id": "dash",
"type": "line",
"source": "geojson",
"paint": {
"line-color": "red",
"line-dasharray": [
2.5,
2.5
],
"line-width": 8
}
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 76 additions & 0 deletions test/integration/render-tests/line-dasharray/case/round/style.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"version": 8,
"metadata": {
"test": {
"height": 200,
"width": 200
}
},
"center": [
0.0,
0.0
],
"zoom": 15,
"sources": {
"geojson": {
"type": "geojson",
"data": {
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
-0.001,
-0.001
],
[
0.001,
0.001
]
]
}
}
}
},
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
{
"id": "case",
"type": "line",
"source": "geojson",
"layout": {
"line-cap": "round"
},
"paint": {
"line-color": "blue",
"line-dasharray": [
1.666666,
1.666666
],
"line-width": 12
}
},
{
"id": "dash",
"type": "line",
"source": "geojson",
"layout": {
"line-cap": "round"
},
"paint": {
"line-color": "red",
"line-dasharray": [
2.5,
2.5
],
"line-width": 8
}
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"version": 8,
"metadata": {
"test": {
"height": 200,
"width": 200
}
},
"center": [
0.0,
0.0
],
"zoom": 15,
"sources": {
"geojson": {
"type": "geojson",
"data": {
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
-0.001,
-0.001
],
[
0.001,
0.001
]
]
}
}
}
},
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
{
"id": "case",
"type": "line",
"source": "geojson",
"layout": {
"line-cap": "square"
},
"paint": {
"line-color": "blue",
"line-dasharray": [
1.666666,
1.666666
],
"line-width": 12
}
},
{
"id": "dash",
"type": "line",
"source": "geojson",
"layout": {
"line-cap": "square"
},
"paint": {
"line-color": "red",
"line-dasharray": [
2.5,
2.5
],
"line-width": 8
}
}
]
}

0 comments on commit 2622b14

Please sign in to comment.