objectBoundingBox-and-clipPath.svg 972 B

1234567891011121314151617181920212223242526
  1. <!--
  2. Any copyright is dedicated to the Public Domain.
  3. http://creativecommons.org/publicdomain/zero/1.0/
  4. -->
  5. <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=489151 -->
  6. <svg xmlns="http://www.w3.org/2000/svg">
  7. <title>Test objectBoundingBox clip-path on element with ancestor transform</title>
  8. <desc>
  9. This test checks that the bbox calculation for an objectBoundingBox
  10. clip-path is correctly getting the bbox in the userspace of the
  11. clipped element, and not it's bbox in an ancestor userspace or rootspace.
  12. </desc>
  13. <clipPath id="clip" clipPathUnits="objectBoundingBox">
  14. <rect x="0.5" width="0.5" height="1"/>
  15. </clipPath>
  16. <rect width="100%" height="100%" fill="lime"/>
  17. <rect x="100" width="100" height="100" fill="red"/>
  18. <g transform="translate(-100,0)">
  19. <g clip-path="url(#clip)">
  20. <rect x="100" width="100" height="100" fill="red"/>
  21. <rect x="200" width="100" height="100" fill="lime"/>
  22. </g>
  23. </g>
  24. </svg>