opacity-and-gradient-02-ref.svg 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  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" version="1.1">
  6. <title>Testcase for opacity on elements referencing a gradient</title>
  7. <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=539165 -->
  8. <defs>
  9. <linearGradient id="lime" gradientUnits="userSpaceOnUse">
  10. <stop stop-color="lime"/>
  11. </linearGradient>
  12. <!-- OS X doesn't draw solid gradients as a solid color so we need to use
  13. a gradient fill below
  14. -->
  15. <linearGradient id="red" gradientUnits="userSpaceOnUse">
  16. <stop stop-color="red"/>
  17. </linearGradient>
  18. </defs>
  19. <rect width="100%" height="100%" fill="url(#lime)"/>
  20. <!-- test 'opacity' -->
  21. <rect width="25%" height="100%" fill="url(#red)" opacity="1"/>
  22. <!-- test 'fill-opacity' -->
  23. <rect x="25%" width="25%" height="100%" fill="url(#red)" opacity="0.5"/>
  24. <!-- test 'fill-opacity' -->
  25. <rect x="50%" width="25%" height="100%" fill="url(#red)" opacity="0.5"/>
  26. </svg>