diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/data/refs/imagemap__--maptype__HTML__clip-path__svg.out | 3 | ||||
| -rw-r--r-- | tests/data/svg/clip-path.svg | 24 | ||||
| -rw-r--r-- | tests/test_imagemap_comparison.py | 1 |
3 files changed, 28 insertions, 0 deletions
diff --git a/tests/data/refs/imagemap__--maptype__HTML__clip-path__svg.out b/tests/data/refs/imagemap__--maptype__HTML__clip-path__svg.out new file mode 100644 index 0000000..4cd2339 --- /dev/null +++ b/tests/data/refs/imagemap__--maptype__HTML__clip-path__svg.out @@ -0,0 +1,3 @@ +<area shape=poly coords=25,25,25,75,50,50 href=http://example.com/1> +<area shape=poly coords=127,27,150,50,127,73,173,73,173,27 href=http://example.com/2> +<area shape=poly coords=230,30,250,50,230,70,270,70,270,30 href=http://example.com/3> diff --git a/tests/data/svg/clip-path.svg b/tests/data/svg/clip-path.svg new file mode 100644 index 0000000..c3b6f7d --- /dev/null +++ b/tests/data/svg/clip-path.svg @@ -0,0 +1,24 @@ +<svg width="300" height="100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <defs> + <clipPath id="slice" clipPathUnits="userSpaceOnUse"> + <polyline points="25,25 50,50 25,75"/> + </clipPath> + <clipPath id="antislice" clipPathUnits="userSpaceOnUse"> + <polyline points="125,25 150,50 125,75 175,75 175,25"/> + </clipPath> + <clipPath id="antislice2" clipPathUnits="userSpaceOnUse"> + <polyline points="225,25 250,50 225,75 275,75 275,25"/> + </clipPath> + </defs> + <a xlink:href="http://example.com/1"> + <rect x="25" y="25" width="50" height="50" clip-path="url(#slice)"/> + </a> + <a xlink:href="http://example.com/2" clip-path="url(#antislice)"> + <rect x="130" y="30" width="40" height="40" stroke-width="6" stroke="lime"/> + </a> + <g clip-path="url(#antislice2)"> + <a xlink:href="http://example.com/3"> + <rect x="230" y="30" width="40" height="40"/> + </a> + </g> +</svg> diff --git a/tests/test_imagemap_comparison.py b/tests/test_imagemap_comparison.py index 4b734b8..e5b59a1 100644 --- a/tests/test_imagemap_comparison.py +++ b/tests/test_imagemap_comparison.py @@ -5,6 +5,7 @@ class ImageMapComparisonTest(ComparisonMixin, TestCase): effect_class = ImageMap compare_file = ( 'svg/alt.svg', + 'svg/clip-path.svg', 'svg/enclave.svg', 'svg/fillstroke.svg', 'svg/group.svg', |
