-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add render-tests for line-dasharray case (#9525)
Trick to mimic an outline with a different color.
- Loading branch information
Showing
6 changed files
with
222 additions
and
0 deletions.
There are no files selected for viewing
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
70
test/integration/render-tests/line-dasharray/case/butt/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
76
test/integration/render-tests/line-dasharray/case/round/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
] | ||
} |
Binary file added
BIN
+1.53 KB
test/integration/render-tests/line-dasharray/case/square/expected.png
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
76
test/integration/render-tests/line-dasharray/case/square/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
] | ||
} |