diff options
author | Federico Mena Quintero <federico@gnome.org> | 2021-06-28 13:48:29 -0500 |
---|---|---|
committer | Federico Mena Quintero <federico@gnome.org> | 2021-06-28 13:48:29 -0500 |
commit | 063d3bcaf13f3825c15d2c01ce67e0c899aa8a05 (patch) | |
tree | fbba4ec6c991b12a35fb2a09d072cb081ddec7b6 | |
parent | 1c1125829cde019804b85e6f39cbf37339e6eeaf (diff) | |
download | librsvg-063d3bcaf13f3825c15d2c01ce67e0c899aa8a05.tar.gz |
Add test for context-stroke in markers
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/556>
-rw-r--r-- | tests/src/reference.rs | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/tests/src/reference.rs b/tests/src/reference.rs index c730070c..c770d9fe 100644 --- a/tests/src/reference.rs +++ b/tests/src/reference.rs @@ -242,6 +242,7 @@ test_compare_render_output!( <path d="M20,50 L80,50" marker-start="url(#marker)" marker-end="url(#marker)" stroke-width="10" stroke="black"/> </svg>"##, + br##"<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"> <path @@ -257,4 +258,35 @@ test_compare_render_output!( x="20" y="45" fill="black"/> </svg>"##, - ); +); + +test_compare_render_output!( + marker_context_stroke, + 400, + 400, + br##"<?xml version="1.0" encoding="UTF-8"?> +<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"> + <style> + .path1 { + fill: none; + stroke-width: 4px; + marker: url(#marker1); + } + </style> + + <path class="path1" d="M20,20 L200,20 L380,20" stroke="lime"/> + + <marker id="marker1" markerWidth="12" markerHeight="12" refX="6" refY="6" + markerUnits="userSpaceOnUse"> + <circle cx="6" cy="6" r="3" + fill="white" stroke="context-stroke" stroke-width="2"/> + </marker> +</svg>"##, + br##"<?xml version="1.0" encoding="UTF-8"?> +<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"> + <path d="M20,20 L200,20 L380,20" stroke="lime" stroke-width="4"/> + <circle cx="20" cy="20" r="3" stroke-width="2" fill="white" stroke="lime"/> + <circle cx="200" cy="20" r="3" stroke-width="2" fill="white" stroke="lime"/> + <circle cx="380" cy="20" r="3" stroke-width="2" fill="white" stroke="lime"/> +</svg>"##, +); |