layout/reftests/filters.svg

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/filters.svg	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,47 @@
     1.4 +<?xml version="1.0"?>
     1.5 +<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
     1.6 +  <defs>
     1.7 +
     1.8 +    <!-- so that other documents can svg:use this one and force it to
     1.9 +         load before onload -->
    1.10 +    <g id="empty" />
    1.11 +
    1.12 +    <!-- Keep all black pixels black, and change any others to white. -->
    1.13 +    <!-- NOTE: alpha is preserved, so it will not adjust alpha edges -->
    1.14 +    <filter id="NonBlackToWhite" x="0%" y="0%" width="100%" height="100%">
    1.15 +      <feColorMatrix type="matrix" values="255 255 255 0 0
    1.16 +                                           255 255 255 0 0
    1.17 +                                           255 255 255 0 0
    1.18 +                                           0 0 0 1 0" />
    1.19 +    </filter>
    1.20 +
    1.21 +    <!-- Keep all white pixels white, and change any others to black. -->
    1.22 +    <!-- NOTE: alpha is preserved, so it will not adjust alpha edges -->
    1.23 +    <filter id="NonWhiteToBlack" x="0%" y="0%" width="100%" height="100%">
    1.24 +      <feComponentTransfer>
    1.25 +        <feFuncR type="linear" slope="-1" intercept="1" />
    1.26 +        <feFuncG type="linear" slope="-1" intercept="1" />
    1.27 +        <feFuncB type="linear" slope="-1" intercept="1" />
    1.28 +      </feComponentTransfer>
    1.29 +      <feColorMatrix type="matrix" values="255 255 255 0 0
    1.30 +                                           255 255 255 0 0
    1.31 +                                           255 255 255 0 0
    1.32 +                                           0 0 0 1 0" />
    1.33 +      <feComponentTransfer>
    1.34 +        <feFuncR type="linear" slope="-1" intercept="1" />
    1.35 +        <feFuncG type="linear" slope="-1" intercept="1" />
    1.36 +        <feFuncB type="linear" slope="-1" intercept="1" />
    1.37 +      </feComponentTransfer>
    1.38 +    </filter>
    1.39 +
    1.40 +    <!-- Threshold colours into sixteen steps per channel. -->
    1.41 +    <filter id="ThresholdRGB" x="0%" y="0%" width="100%" height="100%" color-interpolation-filters="sRGB">
    1.42 +      <feComponentTransfer>
    1.43 +        <feFuncR type="discrete" tableValues="0 .125 .25 .375 .5 .625 .75 .875 1" />
    1.44 +        <feFuncG type="discrete" tableValues="0 .125 .25 .375 .5 .625 .75 .875 1" />
    1.45 +        <feFuncB type="discrete" tableValues="0 .125 .25 .375 .5 .625 .75 .875 1" />
    1.46 +      </feComponentTransfer>
    1.47 +    </filter>
    1.48 +
    1.49 +  </defs>
    1.50 +</svg>

mercurial