diff options
Diffstat (limited to 'test/resources/fop')
-rw-r--r-- | test/resources/fop/svg/images.fo | 40 | ||||
-rw-r--r-- | test/resources/fop/svg/images.svg | 43 | ||||
-rw-r--r-- | test/resources/fop/svg/link.svg | 2 | ||||
-rw-r--r-- | test/resources/fop/svg/logo.jpg | bin | 0 -> 2339 bytes | |||
-rw-r--r-- | test/resources/fop/svg/paints.svg | 68 | ||||
-rw-r--r-- | test/resources/fop/svg/text.svg | 2 | ||||
-rw-r--r-- | test/resources/fop/svg/transparency.svg | 39 |
7 files changed, 193 insertions, 1 deletions
diff --git a/test/resources/fop/svg/images.fo b/test/resources/fop/svg/images.fo new file mode 100644 index 000000000..a9f39a105 --- /dev/null +++ b/test/resources/fop/svg/images.fo @@ -0,0 +1,40 @@ +<?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> + diff --git a/test/resources/fop/svg/images.svg b/test/resources/fop/svg/images.svg new file mode 100644 index 000000000..cad4de988 --- /dev/null +++ b/test/resources/fop/svg/images.svg @@ -0,0 +1,43 @@ +<?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> + diff --git a/test/resources/fop/svg/link.svg b/test/resources/fop/svg/link.svg index 2ccae0522..a4ad520a3 100644 --- a/test/resources/fop/svg/link.svg +++ b/test/resources/fop/svg/link.svg @@ -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> diff --git a/test/resources/fop/svg/logo.jpg b/test/resources/fop/svg/logo.jpg Binary files differnew file mode 100644 index 000000000..8fe6ca9ff --- /dev/null +++ b/test/resources/fop/svg/logo.jpg diff --git a/test/resources/fop/svg/paints.svg b/test/resources/fop/svg/paints.svg new file mode 100644 index 000000000..3365fcd81 --- /dev/null +++ b/test/resources/fop/svg/paints.svg @@ -0,0 +1,68 @@ +<?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 & 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> + diff --git a/test/resources/fop/svg/text.svg b/test/resources/fop/svg/text.svg index 405e09c2d..7a8b49e96 100644 --- a/test/resources/fop/svg/text.svg +++ b/test/resources/fop/svg/text.svg @@ -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> diff --git a/test/resources/fop/svg/transparency.svg b/test/resources/fop/svg/transparency.svg new file mode 100644 index 000000000..8f42e177f --- /dev/null +++ b/test/resources/fop/svg/transparency.svg @@ -0,0 +1,39 @@ +<?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> + |