diff options
author | Keiron Liddle <keiron@apache.org> | 2002-07-05 06:10:54 +0000 |
---|---|---|
committer | Keiron Liddle <keiron@apache.org> | 2002-07-05 06:10:54 +0000 |
commit | 1fd01e65ececda8404e149115eb48c9fd0554d21 (patch) | |
tree | 76bea51051940a24e1c94002f93adac27628d798 | |
parent | a2476a424879e2a8bccbde82839745056f6af373 (diff) | |
download | xmlgraphics-fop-1fd01e65ececda8404e149115eb48c9fd0554d21.tar.gz xmlgraphics-fop-1fd01e65ececda8404e149115eb48c9fd0554d21.zip |
some test images and fo with alignment, viewports etc.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194967 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | test/resources/fop/image/align.fo | 68 | ||||
-rw-r--r-- | test/resources/fop/image/align2.fo | 68 | ||||
-rw-r--r-- | test/resources/fop/image/logo.bmp | bin | 0 -> 30054 bytes | |||
-rw-r--r-- | test/resources/fop/image/logo.gif | bin | 0 -> 2530 bytes | |||
-rw-r--r-- | test/resources/fop/image/logo.jpg | bin | 0 -> 2339 bytes | |||
-rw-r--r-- | test/resources/fop/image/logo.png | bin | 0 -> 4521 bytes | |||
-rw-r--r-- | test/resources/fop/image/logo.svg | 81 | ||||
-rwxr-xr-x | test/resources/fop/image/logo.tif | bin | 0 -> 40314 bytes | |||
-rw-r--r-- | test/resources/fop/image/size.fo | 91 | ||||
-rw-r--r-- | test/resources/fop/image/types.fo | 52 |
10 files changed, 360 insertions, 0 deletions
diff --git a/test/resources/fop/image/align.fo b/test/resources/fop/image/align.fo new file mode 100644 index 000000000..e431bdc11 --- /dev/null +++ b/test/resources/fop/image/align.fo @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="utf-8"?> + +<fo:root font-family="Times Roman" font-size="12pt" text-align="center" xmlns:fo="http://www.w3.org/1999/XSL/Format"> + +<fo:layout-master-set> + <fo:simple-page-master + margin-right="1.5cm" + margin-left="1.5cm" + margin-bottom="2cm" + margin-top="1cm" + page-width="21cm" + page-height="29.7cm" + master-name="left"> + <fo:region-before extent="1cm"/> + <fo:region-body margin-top="1cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + +</fo:layout-master-set> + +<fo:page-sequence id="N2528" master-reference="left"> + +<fo:static-content flow-name="xsl-region-after"> + <fo:block text-align-last="center" font-size="10pt"> + <fo:page-number/> + </fo:block> +</fo:static-content> + +<fo:flow flow-name="xsl-region-body"> +<fo:block font-size="18pt" font-weight="bold">1. FOP test for images</fo:block> +<fo:block> + <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Align in Larger Viewport</fo:block> + <fo:block> +Default align: +(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" src="file:logo.jpg"/>), start +(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="start" src="file:logo.jpg"/>), end +(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="end" src="file:logo.jpg"/>), center +(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="center" src="file:logo.jpg"/>), before +(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" display-align="before" src="file:logo.jpg"/>), after +(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" display-align="after" src="file:logo.jpg"/>), center +(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" display-align="center" src="file:logo.jpg"/>). + </fo:block> + <fo:block> +Default align: +(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" src="file:logo.jpg"/>), start-before +(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="start" display-align="before" src="file:logo.jpg"/>), start-after +(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="start" display-align="after" src="file:logo.jpg"/>), start-center +(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="start" display-align="center" src="file:logo.jpg"/>), center-before +(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="center" display-align="before" src="file:logo.jpg"/>), center-center +(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="center" display-align="center" src="file:logo.jpg"/>), center-after +(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="center" display-align="after" src="file:logo.jpg"/>). + </fo:block> + + <fo:block> +end-before +(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="end" display-align="before" src="file:logo.jpg"/>), end-center +(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="end" display-align="center" src="file:logo.jpg"/>), end-after +(<fo:external-graphic width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="end" display-align="after" src="file:logo.jpg"/>). + </fo:block> + + <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em"/> + This section is only required to show that the layout still works. +</fo:block> +</fo:flow> +</fo:page-sequence> + +</fo:root> + diff --git a/test/resources/fop/image/align2.fo b/test/resources/fop/image/align2.fo new file mode 100644 index 000000000..12f676181 --- /dev/null +++ b/test/resources/fop/image/align2.fo @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="utf-8"?> + +<fo:root font-family="Times Roman" font-size="12pt" text-align="center" xmlns:fo="http://www.w3.org/1999/XSL/Format"> + +<fo:layout-master-set> + <fo:simple-page-master + margin-right="1.5cm" + margin-left="1.5cm" + margin-bottom="2cm" + margin-top="1cm" + page-width="21cm" + page-height="29.7cm" + master-name="left"> + <fo:region-before extent="1cm"/> + <fo:region-body margin-top="1cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + +</fo:layout-master-set> + +<fo:page-sequence id="N2528" master-reference="left"> + +<fo:static-content flow-name="xsl-region-after"> + <fo:block text-align-last="center" font-size="10pt"> + <fo:page-number/> + </fo:block> +</fo:static-content> + +<fo:flow flow-name="xsl-region-body"> +<fo:block font-size="18pt" font-weight="bold">1. FOP test for images</fo:block> +<fo:block> + <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Align in Smaller Viewport</fo:block> + <fo:block> +Default align: +(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" src="file:logo.jpg"/>), start +(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="start" src="file:logo.jpg"/>), center +(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="center" src="file:logo.jpg"/>), end +(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="end" src="file:logo.jpg"/>), before +(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" display-align="before" src="file:logo.jpg"/>), after +(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" display-align="after" src="file:logo.jpg"/>), center +(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" display-align="center" src="file:logo.jpg"/>). + </fo:block> + <fo:block> +Default align: +(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" src="file:logo.jpg"/>), start-before +(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="start" display-align="start" src="file:logo.jpg"/>), start-center +(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="start" display-align="center" src="file:logo.jpg"/>), start-after +(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="start" display-align="after" src="file:logo.jpg"/>), center-before +(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="center" display-align="before" src="file:logo.jpg"/>), center-after +(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="center" display-align="after" src="file:logo.jpg"/>), center-center +(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="center" display-align="center" src="file:logo.jpg"/>). + </fo:block> + + <fo:block> +end-before +(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="end" display-align="before" src="file:logo.jpg"/>), end-after +(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="end" display-align="after" src="file:logo.jpg"/>), end-center +(<fo:external-graphic width="50pt" height="50pt" overflow="hidden" text-align="end" display-align="center" src="file:logo.jpg"/>). + </fo:block> + + <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em"/> + This section is only required to show that the layout still works. +</fo:block> +</fo:flow> +</fo:page-sequence> + +</fo:root> + diff --git a/test/resources/fop/image/logo.bmp b/test/resources/fop/image/logo.bmp Binary files differnew file mode 100644 index 000000000..3a433e95e --- /dev/null +++ b/test/resources/fop/image/logo.bmp diff --git a/test/resources/fop/image/logo.gif b/test/resources/fop/image/logo.gif Binary files differnew file mode 100644 index 000000000..a87f3322a --- /dev/null +++ b/test/resources/fop/image/logo.gif diff --git a/test/resources/fop/image/logo.jpg b/test/resources/fop/image/logo.jpg Binary files differnew file mode 100644 index 000000000..8fe6ca9ff --- /dev/null +++ b/test/resources/fop/image/logo.jpg diff --git a/test/resources/fop/image/logo.png b/test/resources/fop/image/logo.png Binary files differnew file mode 100644 index 000000000..c38d67c86 --- /dev/null +++ b/test/resources/fop/image/logo.png diff --git a/test/resources/fop/image/logo.svg b/test/resources/fop/image/logo.svg new file mode 100644 index 000000000..4480deeb8 --- /dev/null +++ b/test/resources/fop/image/logo.svg @@ -0,0 +1,81 @@ +<?xml version="1.0" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN" + "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd"> +<svg width="100" height="100"> +<defs> + +<text id="asf"> +Apache Software Foundation Apache Software Foundation +Apache Software Foundation Apache Software Foundation +Apache Software Foundation Apache Software Foundation +Apache Software Foundation Apache Software Foundation +Apache Software Foundation Apache Software Foundation +Apache Software Foundation +</text> + +<g id="f"> +<path style="stroke:rgb(20,20,20);stroke-width:8" id="square1" d="M0 0h140v130h-140z"/> +<text font-weight="bold" font-size="6" style="text-anchor:start"> +<textPath style="stroke:rgb(40,40,40)" xlink:href="#square1"> +<tspan dy="3"> +<tref xlink:href="#asf"/> +</tspan> +</textPath> +</text> +<g style="stroke:black;stroke-width:8"> +<line x1="15" y1="20" x2="125" y2="20"/> +<line x1="15" y1="40" x2="50" y2="40"/> +<line x1="15" y1="60" x2="100" y2="60"/> +<line x1="15" y1="85" x2="50" y2="85"/> +<line x1="15" y1="110" x2="50" y2="110"/> +</g> +</g> + +<g id="o"> +<path style="stroke:rgb(20,20,20);stroke-width:8" id="square2" d="M0 0h130v130h-130z"/> +<text font-weight="bold" font-size="6" style="text-anchor:start"> +<textPath style="stroke:rgb(40,40,40)" xlink:href="#square2"> +<tspan dy="3"> +<tref xlink:href="#asf"/> +</tspan> +</textPath> +</text> +<g style="stroke:black;stroke-width:8"> +<line x1="50" y1="30" x2="80" y2="30"/> +<line x1="30" y1="45" x2="100" y2="45"/> +<line x1="20" y1="60" x2="110" y2="60"/> +<line x1="30" y1="80" x2="100" y2="80"/> +<line x1="50" y1="100" x2="80" y2="100"/> +</g> +</g> + +<g id="p"> +<path style="stroke:rgb(20,20,20);stroke-width:8" id="square3" d="M0 0h130v130h-130z"/> +<text font-weight="bold" font-size="6" style="text-anchor:start"> +<textPath style="stroke:rgb(40,40,40)" xlink:href="#square3"> +<tspan dy="3"> +<tref xlink:href="#asf"/> +</tspan> +</textPath> +</text> +<g style="stroke:black;stroke-width:8"> +<line x1="15" y1="20" x2="110" y2="20"/> +<line x1="15" y1="40" x2="40" y2="40"/> +<line x1="90" y1="40" x2="120" y2="40"/> +<line x1="15" y1="60" x2="105" y2="60"/> +<line x1="15" y1="85" x2="50" y2="85"/> +<line x1="15" y1="110" x2="50" y2="110"/> +</g> +</g> + +<svg viewBox="0 0 230 230" id="FOP_Mark"> +<use x="90" y="41" style="fill:rgb(100,150,200);opacity:0.6" xlink:href="#p"/> +<use x="40" y="96" style="fill:rgb(120,228,120);opacity:0.6" xlink:href="#o"/> +<use x="5" y="5" style="fill:rgb(200,100,100);opacity:0.6" xlink:href="#f"/> +</svg> + +</defs> + +<use xlink:href="#FOP_Mark"/> +</svg> + diff --git a/test/resources/fop/image/logo.tif b/test/resources/fop/image/logo.tif Binary files differnew file mode 100755 index 000000000..ddfe12464 --- /dev/null +++ b/test/resources/fop/image/logo.tif diff --git a/test/resources/fop/image/size.fo b/test/resources/fop/image/size.fo new file mode 100644 index 000000000..2997c61e9 --- /dev/null +++ b/test/resources/fop/image/size.fo @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="utf-8"?> + +<fo:root font-family="Times Roman" font-size="12pt" text-align="center" xmlns:fo="http://www.w3.org/1999/XSL/Format"> + +<fo:layout-master-set> + <fo:simple-page-master + margin-right="1.5cm" + margin-left="1.5cm" + margin-bottom="2cm" + margin-top="1cm" + page-width="21cm" + page-height="29.7cm" + master-name="left"> + <fo:region-before extent="1cm"/> + <fo:region-body margin-top="1cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + +</fo:layout-master-set> + +<fo:page-sequence id="N2528" master-reference="left"> + +<fo:static-content flow-name="xsl-region-after"> + <fo:block text-align-last="center" font-size="10pt"> + <fo:page-number/> + </fo:block> +</fo:static-content> + +<fo:flow flow-name="xsl-region-body"> +<fo:block font-size="18pt" font-weight="bold">1. FOP test for images</fo:block> +<fo:block> + <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Normal</fo:block> + <fo:block> +The image (<fo:external-graphic src="file:logo.jpg"/>) is placed normally. + </fo:block> +</fo:block> + +<fo:block> + <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Sized</fo:block> + <fo:block> +The image +(<fo:external-graphic content-width="50pt" content-height="50pt" src="file:logo.jpg"/>) +has the content size set. + </fo:block> +</fo:block> + +<fo:block> + <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Sized</fo:block> + <fo:block> +The image +(<fo:external-graphic width="150pt" height="50pt" src="file:logo.jpg"/>) +has the width and height set. + </fo:block> +</fo:block> + +<fo:block> + <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Sized</fo:block> + <fo:block> +The image +(<fo:external-graphic inline-progression-dimension.optimum="150pt" block-progression-dimension.optimum="50pt" src="file:logo.jpg"/>) +has the ipd and bpd set. + </fo:block> +</fo:block> + +<fo:block> + <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Clipped</fo:block> + <fo:block> +The image +(<fo:external-graphic width="100pt" height="100pt" content-width="200pt" content-height="200pt" overflow="hidden" src="file:logo.jpg"/>) +is clipped with the content size double the viewport size. + </fo:block> +</fo:block> + +<fo:block> + <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Clipped</fo:block> + <fo:block> +The image +(<fo:external-graphic width="50pt" height="50pt" overflow="error-if-overflow" src="file:logo.jpg"/>) +is clipped with the content size double the viewport size. + </fo:block> +</fo:block> + +<fo:block> + <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em"/> + This section is only required to show that the layout still works. +</fo:block> +</fo:flow> +</fo:page-sequence> + +</fo:root> + diff --git a/test/resources/fop/image/types.fo b/test/resources/fop/image/types.fo new file mode 100644 index 000000000..cf3df156b --- /dev/null +++ b/test/resources/fop/image/types.fo @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="utf-8"?> + +<fo:root font-family="Times Roman" font-size="12pt" text-align="center" xmlns:fo="http://www.w3.org/1999/XSL/Format"> + +<fo:layout-master-set> + <fo:simple-page-master + margin-right="1.5cm" + margin-left="1.5cm" + margin-bottom="2cm" + margin-top="1cm" + page-width="21cm" + page-height="29.7cm" + master-name="left"> + <fo:region-before extent="1cm"/> + <fo:region-body margin-top="1cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + +</fo:layout-master-set> + +<fo:page-sequence id="N2528" master-reference="left"> + +<fo:static-content flow-name="xsl-region-after"> + <fo:block text-align-last="center" font-size="10pt"> + <fo:page-number/> + </fo:block> +</fo:static-content> + +<fo:flow flow-name="xsl-region-body"> +<fo:block font-size="18pt" font-weight="bold">Types of Images</fo:block> +<fo:block> + <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Normal</fo:block> + <fo:block> +The various types of images in FOP are: +jpeg (<fo:external-graphic src="file:logo.jpg"/>), +gif (<fo:external-graphic src="file:logo.gif"/>), +tiff (<fo:external-graphic src="file:logo.tif"/>), +svg (<fo:external-graphic src="file:logo.svg"/>), +bmp (<fo:external-graphic src="file:logo.bmp"/>), +png (<fo:external-graphic src="file:logo.png"/>). + </fo:block> +</fo:block> + +<fo:block> + <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em"/> + This section is only required to show that the layout still works. +</fo:block> +</fo:flow> +</fo:page-sequence> + +</fo:root> + |