marker-orientation-01.svg 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <!--
  2. Any copyright is dedicated to the Public Domain.
  3. http://creativecommons.org/publicdomain/zero/1.0/
  4. -->
  5. <svg xmlns="http://www.w3.org/2000/svg">
  6. <title>Test that marker orientation is correct at the end of arcs</title>
  7. <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=769115 -->
  8. <marker id="m1" markerWidth="40" markerHeight="40" refX="20" refY="20"
  9. markerUnits="userSpaceOnUse" orient="auto" fill="blue">
  10. <rect x="5" y="15" width="22" height="10"/>
  11. <path d="M 25,10 35,20 25,30 z"/>
  12. </marker>
  13. <marker id="m2" markerWidth="40" markerHeight="40" refX="20" refY="20"
  14. markerUnits="userSpaceOnUse" orient="auto" fill="red">
  15. <rect x="5" y="15" width="22" height="10"/>
  16. <path d="M 25,10 35,20 25,30 z"/>
  17. </marker>
  18. <g fill="none">
  19. <!-- arcs that go from the left of the circle to... -->
  20. <g marker-end="url(#m2)">
  21. <!-- ...90 degrees anti-clockwise -->
  22. <path d="M100,100 A 50,50 0 1 0 150,50" marker-start="url(#m1)"/>
  23. <!-- ...180 degrees anti-clockwise -->
  24. <path d="M100,100 A 50,50 0 0 0 200,100"/>
  25. <!-- ...270 degrees anti-clockwise -->
  26. <path d="M100,100 A 50,50 0 0 0 150,150"/>
  27. </g>
  28. <!-- arcs that go from the left of the circle to... -->
  29. <g marker-end="url(#m2)" transform="translate(250,0)">
  30. <!-- ...90 degrees clockwise -->
  31. <path d="M100,100 A 50,50 0 0 1 150,50" marker-start="url(#m1)"/>
  32. <!-- ...180 degrees clockwise -->
  33. <path d="M100,100 A 50,50 0 1 1 200,100"/>
  34. <!-- ...270 degrees clockwise -->
  35. <path d="M100,100 A 50,50 0 1 1 150,150"/>
  36. </g>
  37. <!-- arcs that go from the right of the circle to... -->
  38. <g marker-end="url(#m2)" transform="translate(0,250)">
  39. <!-- ...90 degrees anti-clockwise -->
  40. <path d="M200,100 A 50,50 0 0 1 150,150" marker-start="url(#m1)"/>
  41. <!-- ...180 degrees anti-clockwise -->
  42. <path d="M200,100 A 50,50 0 0 1 100,100"/>
  43. <!-- ...270 degrees anti-clockwise -->
  44. <path d="M200,100 A 50,50 0 1 1 150,50"/>
  45. </g>
  46. <!-- arcs that go from the right of the circle to... -->
  47. <g marker-end="url(#m2)" transform="translate(250,250)">
  48. <!-- ...90 degrees anti-clockwise -->
  49. <path d="M200,100 A 50,50 0 0 0 150,50" marker-start="url(#m1)"/>
  50. <!-- ...180 degrees anti-clockwise -->
  51. <path d="M200,100 A 50,50 0 1 0 100,100"/>
  52. <!-- ...270 degrees anti-clockwise -->
  53. <path d="M200,100 A 50,50 0 1 0 150,150"/>
  54. </g>
  55. </g>
  56. </svg>