You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ke...@apache.org on 2002/06/21 17:17:37 UTC

cvs commit: xml-fop/test/resources/fop/svg images.fo images.svg logo.jpg paints.svg transparency.svg link.svg text.svg

keiron      2002/06/21 08:17:37

  Modified:    test/resources/fop/svg link.svg text.svg
  Added:       test/resources/fop/svg images.fo images.svg logo.jpg
                        paints.svg transparency.svg
  Log:
  more svg tests with transparency, patterns and images
  
  Revision  Changes    Path
  1.2       +1 -1      xml-fop/test/resources/fop/svg/link.svg
  
  Index: link.svg
  ===================================================================
  RCS file: /home/cvs/xml-fop/test/resources/fop/svg/link.svg,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- link.svg	14 Jun 2002 14:29:48 -0000	1.1
  +++ link.svg	21 Jun 2002 15:17:36 -0000	1.2
  @@ -15,7 +15,7 @@
   <text x="130" y="60" style="font-size:18;fill:blue">FOP</text>
   </a>
   
  -<a xlink:href="jpeg.svg#svgView(viewBox(0,0,200,200))">
  +<a xlink:href="images.svg#svgView(viewBox(0,0,200,200))">
   <rect x="10" y="110" width="80" height="80" style="fill:yellow;stroke:black;stroke-width:3"/>
   <text x="20" y="150" style="font-size:14;fill:purple">Another</text>
   <text x="35" y="165" style="font-size:14;fill:purple">file</text>
  
  
  
  1.3       +2 -0      xml-fop/test/resources/fop/svg/text.svg
  
  Index: text.svg
  ===================================================================
  RCS file: /home/cvs/xml-fop/test/resources/fop/svg/text.svg,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- text.svg	17 Jun 2002 09:44:05 -0000	1.2
  +++ text.svg	21 Jun 2002 15:17:36 -0000	1.3
  @@ -113,6 +113,8 @@
     <text x="15" y="310" font-family="FOPFont" font-size="12">FOP in FOPfont</text>
   </g>
   
  +  <!-- empty element -->
  +  <text/>
   </g>
   
   </svg>
  
  
  
  1.1                  xml-fop/test/resources/fop/svg/images.fo
  
  Index: images.fo
  ===================================================================
  <?xml version="1.0" encoding="utf-8"?>
  
  <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  
    <fo:layout-master-set>
      <fo:simple-page-master master-name="simple"
                    page-height="29.7cm" 
                    page-width="21cm"
                    margin-top="1cm" 
                    margin-bottom="2cm" 
                    margin-left="2.5cm" 
                    margin-right="2.5cm">
        <fo:region-body margin-top="3cm"/>
        <fo:region-before extent="3cm"/>
        <fo:region-after extent="1.5cm"/>
      </fo:simple-page-master>
    </fo:layout-master-set>
  
    <fo:page-sequence master-reference="simple">
  
      <fo:flow flow-name="xsl-region-body">
  
        <fo:block space-after.optimum="40pt">                
          Embedded/Image SVG
        </fo:block>
  
        <fo:block>                
  <fo:external-graphic src="images.svg"/>
        </fo:block>
  
        <fo:block>
  Image in FO Document.
        </fo:block>
        <fo:block>
  <fo:external-graphic src="logo.jpg"/>
        </fo:block>
      </fo:flow>
    </fo:page-sequence>
  </fo:root>
  
  
  
  
  1.1                  xml-fop/test/resources/fop/svg/images.svg
  
  Index: images.svg
  ===================================================================
  <?xml version="1.0" encoding="iso-8859-1"?>
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"
        "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd">
  <svg width="400" height="400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  
  <g>
  
  <text x="20" y="20" style="font-size:18">Images in SVG</text>
  
  <text x="20" y="35" style="font-size:12">Jpeg</text>
  <image x="30" y="55" width="100" height="80" xlink:href="logo.jpg"/>
  </g>
  
  <text x="20" y="160" style="font-size:12">Effect or Bitmap</text>
  <g>
  <defs>
        <filter id="Turb1" filterUnits="objectBoundingBox"
                x="0%" y="0%" width="100%" height="100%">
          <feTurbulence type="fractalNoise" baseFrequency="0.1" numOctaves="1"/>
        </filter>
        <filter id="Turb2" filterUnits="objectBoundingBox"
                x="0%" y="0%" width="100%" height="100%">
          <feTurbulence type="fractalNoise" baseFrequency="0.15" numOctaves="1"/>
        </filter>
  </defs>
      <rect x="25" y="165" width="100" height="75" style="filter:url(#Turb1)" />
  
  
  <text x="20" y="255" style="font-size:12">Transparency</text>
      <rect x="20" y="260" width="40" height="35" style="fill:blue" />
  <text x="60" y="305" style="font-size:20;font-weight:bold">SEE</text>
      <rect x="25" y="265" width="100" height="75" style="filter:url(#Turb2)" />
  
  
  <text x="200" y="35" style="font-size:12">Scaled</text>
  <g transform="scale(4)">
      <rect x="55" y="15" width="25" height="18.75" style="filter:url(#Turb1)" />
  </g>
  
  </g>
  
  </svg>
  
  
  
  
  1.1                  xml-fop/test/resources/fop/svg/logo.jpg
  
  	<<Binary file>>
  
  
  1.1                  xml-fop/test/resources/fop/svg/paints.svg
  
  Index: paints.svg
  ===================================================================
  <?xml version="1.0" encoding="iso-8859-1"?>
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"
        "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd">
  <svg width="400" height="400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  
  <g>
  
  <text x="20" y="20" style="font-size:18">Paints - Patterns &amp; Gradients</text>
  
  <text x="10" y="35" style="font-size:12">Gradient</text>
  <g>
  <defs>
          <linearGradient id="grad1" x1="0" y1="0" x2="1" y2="0">
                  <stop offset="0" style="stop-color:crimson" />
                  <stop offset="1" style="stop-color:gold" />
          </linearGradient>
          <linearGradient id="grad2" x1="0" y1="0" x2="0" y2="1">
                  <stop offset="0" style="stop-color:crimson" />
                  <stop offset="1" style="stop-color:gold" />
          </linearGradient>
          <linearGradient id="grad3" x1="0" y1="0" x2="1" y2="1">
                  <stop offset="0" style="stop-color:crimson" />
                  <stop offset="1" style="stop-color:gold" />
          </linearGradient>
          <radialGradient id="rad"
              fx="20%" fy="0%" rx="10%" ry="30%" r="40%">
              <stop offset="0" stop-color="gold" />
              <stop offset="1" stop-color="green" stop-opacity="0.4"/>
          </radialGradient>
  </defs>
      <rect x="15" y="40" width="100" height="75" style="fill:url(#grad1)" />
      <rect x="15" y="117.5" width="100" height="75" style="fill:url(#grad2)" />
      <rect x="15" y="195" width="100" height="75" style="fill:url(#grad3)" />
      <rect x="15" y="275" width="100" height="75" style="fill:url(#rad)" />
  
  </g>
  
  <text x="120" y="35" style="font-size:12">Pattern</text>
  <g> 
  <defs>
          <pattern id="pat1" x="0" y="0" width=".75" height="50%">
              <circle cx="10" cy="10" r="10" style="fill:red" />
              <rect x="10" y="10" width="15" height="15" style="fill:green"/>
          </pattern>
          <pattern id="pat2" x="0" y="0" width=".2" height="50%">
              <circle cx="10" cy="10" r="10" style="fill:red" />
              <rect x="10" y="10" width="15" height="15" style="fill:green"/>
          </pattern>
          <pattern id="pat3" x="0" y="0" width=".3" height="50%" patternTransform="matrix(1, 0.3, -0.5, 1, 5, 10)">
              <circle cx="10" cy="10" r="10" style="fill:red" />
              <rect x="10" y="10" width="15" height="15" style="fill:green"/>
          </pattern>
          <pattern id="see" x="0" y="0" width="25" height="25" patternUnits="userSpaceOnUse">
              <circle cx="10" cy="10" r="10" style="fill:red" />
              <rect x="10" y="10" width="15" height="15" style="fill:green;fill-opacity:0.5"/>
          </pattern>
  </defs>
      <rect x="125" y="40" width="100" height="75" style="fill:url(#pat1)" />
      <rect x="125" y="117.5" width="100" height="75" style="fill:url(#pat2)" />
      <rect x="125" y="195" width="100" height="75" style="fill:url(#pat3)" />
      <rect x="125" y="275" width="100" height="75" style="fill:url(#see)" />
  
  </g>
  
  </g>
  
  </svg>
  
  
  
  
  1.1                  xml-fop/test/resources/fop/svg/transparency.svg
  
  Index: transparency.svg
  ===================================================================
  <?xml version="1.0" encoding="iso-8859-1"?>
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"
        "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd">
  <svg width="400" height="400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  
  <g>
  
  <text x="20" y="20" style="font-size:18">Transparency in SVG (to PDF)</text>
  
  <text x="20" y="35" style="font-size:12">Shapes</text>
  <rect x="30" y="55" width="100" height="80" style="fill:green;stroke:blue;stroke-width:3;fill-opacity:0.5;stroke-opacity:0.6"/>
  <rect x="80" y="95" width="100" height="80" style="fill:red;stroke:yellow;stroke-width:3;fill-opacity:0.5"/>
  
  
  </g>
  
  <g>
  <defs>
        <filter id="Turb" filterUnits="objectBoundingBox"
                x="0%" y="0%" width="100%" height="100%">
          <feTurbulence type="fractalNoise" baseFrequency="0.1" numOctaves="1"/>
        </filter>
  </defs>
  
  <text x="20" y="205" style="font-size:12">Image</text>
      <rect x="20" y="210" width="40" height="35" style="fill:blue" />
  <text x="60" y="255" style="font-size:20;font-weight:bold">SEE</text>
      <rect x="25" y="215" width="100" height="75" style="filter:url(#Turb)" />
  
  
  </g>
  
  <text x="220" y="35" style="font-size:12">Text</text>
  <rect x="240" y="55" width="130" height="50" style="fill:blue"/>
  <text x="280" y="75" style="font-size:20;font-weight:bold;fill-opacity:0.6;fill:green">SEE</text>
  <text x="250" y="95" style="font-size:20;font-weight:bold;fill-opacity:0.4;fill:orange;stroke:red">THROUGH</text>
  
  </svg>
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org