layout/reftests/svg/text-gradient-04.svg

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

     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">
     7   <title>Test for gradients being positioned correctly within filters</title>
     8   <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=797708 -->
    10   <style>
    11     @font-face {
    12       src: url(../fonts/Ahem.ttf);
    13       font-family: Ahem;
    14     }
    15   </style>
    17   <linearGradient id="g" gradientUnits="userSpaceOnUse" x1="100" y1="0" x2="300" y2="0">
    18     <stop offset="0" stop-color="red"/>
    19     <stop offset="0.5" stop-color="red"/>
    20     <stop offset="0.5" stop-color="blue"/>
    21     <stop offset="1" stop-color="blue"/>
    22   </linearGradient>
    24   <filter id="f">
    25     <feMerge>
    26       <feMergeNode in="SourceGraphic"/>
    27     </feMerge>
    28   </filter>
    30   <clipPath id="c">
    31     <path d="M 130,70 h 40 v 40 h -40 z
    32              M 230,70 h 40 v 40 h -40 z"/>
    33   </clipPath>
    35   <g style="font: 64px Ahem; fill: url(#g); text-anchor: middle; filter: url(#f); clip-path: url(#c)">
    36     <text x="150" y="100">a</text>
    37     <text x="250" y="100">a</text>
    38   </g>
    39 </svg>

mercurial