aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-08-31 13:23:01 +0000
committerJeremias Maerki <jeremias@apache.org>2005-08-31 13:23:01 +0000
commit4b20ba483248df48d9501c48926dd437712ed682 (patch)
treeabb2ef51576d82d961b0dcd53f44484ee6275b8b
parentf0763b71e182a6192769cda1bca740e05b21f2c3 (diff)
downloadxmlgraphics-fop-4b20ba483248df48d9501c48926dd437712ed682.tar.gz
xmlgraphics-fop-4b20ba483248df48d9501c48926dd437712ed682.zip
external-graphic property demonstration section.
asf-logo-nt.png is the non-transparent version of asf-logo.png. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@265037 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--examples/fo/basic/images.fo60
-rw-r--r--examples/fo/graphics/asf-logo-nt.pngbin0 -> 12120 bytes
2 files changed, 52 insertions, 8 deletions
diff --git a/examples/fo/basic/images.fo b/examples/fo/basic/images.fo
index 025fea465..5ad915385 100644
--- a/examples/fo/basic/images.fo
+++ b/examples/fo/basic/images.fo
@@ -79,14 +79,14 @@
<!--fox:destination internal-destination="N2555"/-->
<fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">A PNG image in FOP</fo:block>
<fo:block>
- <!--fo:external-graphic src="file:../graphics/asf-logo.png"/-->
+ <fo:external-graphic src="file:../graphics/asf-logo.png"/>
</fo:block>
</fo:block>
<fo:block id="N2556">
<!--fox:destination internal-destination="N2556"/-->
<fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">A TIFF image in FOP</fo:block>
<fo:block>
- <!--fo:external-graphic src="../graphics/asf-logo.tif"/-->
+ <fo:external-graphic src="../graphics/asf-logo.tif"/>
</fo:block>
</fo:block>
<fo:block id="N2559">
@@ -101,14 +101,58 @@
<fo:page-sequence id="N2561" master-reference="psmOddEven">
<fo:static-content flow-name="xsl-region-after">
-<fo:block text-align-last="center" font-size="10pt">
- <fo:page-number/>
-</fo:block>
+ <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 id="AppendixA" font-size="18pt" font-weight="bold">A. Appendix</fo:block>
- <!--fox:destination internal-destination="AppendixA"/-->
+<fo:flow flow-name="xsl-region-body" text-align="start" font-size="10pt">
+ <fo:block id="e-g-use" font-size="18pt" font-weight="bold">A. The usage of fo:external-graphic</fo:block>
+ <fo:block>
+ <fo:block>The image used in these examples has the following properties:</fo:block>
+ <fo:block start-indent="1cm">
+ <fo:block>169 x 51 px, 96 dpi, results in an intrinsic size of 44.715 x 13.494 mm</fo:block>
+ </fo:block>
+ <fo:block>
+ All the examples here will have a border="solid 0.1pt" to show the size of the viewport generated by the
+ external-graphic element and a background-color="yellow" to show what parts of the viewport are painted
+ upon by the image in the reference area. The image used is the non-transparent version of asf-logo.png:
+ file:../graphics/asf-logo.png
+ </fo:block>
+
+ <fo:block keep-with-next.within-column="always">Properties: [none]</fo:block>
+ <fo:block><fo:external-graphic src="file:../graphics/asf-logo-nt.png" border="solid 0.1pt" background-color="yellow"/></fo:block>
+
+ <fo:block keep-with-next.within-column="always">Properties: width="60mm" height="20mm"</fo:block>
+ <fo:block><fo:external-graphic src="file:../graphics/asf-logo-nt.png" width="60mm" height="20mm" border="solid 0.1pt" background-color="yellow"/></fo:block>
+
+ <fo:block keep-with-next.within-column="always">Properties: inline-progression-dimension="60mm" block-progression-dimension="20mm"</fo:block>
+ <fo:block><fo:external-graphic src="file:../graphics/asf-logo-nt.png" inline-progression-dimension="60mm" block-progression-dimension="20mm" border="solid 0.1pt" background-color="yellow"/></fo:block>
+
+ <fo:block keep-with-next.within-column="always">Properties: width="30mm" height="20mm"</fo:block>
+ <fo:block><fo:external-graphic src="file:../graphics/asf-logo-nt.png" width="30mm" height="20mm" border="solid 0.1pt" background-color="yellow"/></fo:block>
+
+ <fo:block keep-with-next.within-column="always">Properties: width="30mm" height="20mm" overflow="hidden"</fo:block>
+ <fo:block><fo:external-graphic src="file:../graphics/asf-logo-nt.png" width="30mm" height="20mm" overflow="hidden" border="solid 0.1pt" background-color="yellow"/></fo:block>
+
+ <fo:block keep-with-next.within-column="always">Properties: width="60mm" height="20mm" text-align="center" display-align="center"</fo:block>
+ <fo:block><fo:external-graphic src="file:../graphics/asf-logo-nt.png" width="60mm" height="20mm" text-align="center" display-align="center" border="solid 0.1pt" background-color="yellow"/></fo:block>
+
+ <fo:block keep-with-next.within-column="always">Properties: content-height="20mm"</fo:block>
+ <fo:block><fo:external-graphic src="file:../graphics/asf-logo-nt.png" content-height="20mm" border="solid 0.1pt" background-color="yellow"/></fo:block>
+
+ <fo:block keep-with-next.within-column="always">Properties: content-width="60mm" content-height="40mm"</fo:block>
+ <fo:block><fo:external-graphic src="file:../graphics/asf-logo-nt.png" content-width="60mm" content-height="40mm" border="solid 0.1pt" background-color="yellow"/></fo:block>
+
+ <fo:block keep-with-next.within-column="always">Properties: content-width="60mm" content-height="40mm" scaling="non-uniform"</fo:block>
+ <fo:block><fo:external-graphic src="file:../graphics/asf-logo-nt.png" content-width="60mm" content-height="40mm" scaling="non-uniform" border="solid 0.1pt" background-color="yellow"/></fo:block>
+
+ <fo:block keep-with-next.within-column="always">Properties: width="60mm" height="20mm" content-width="scale-to-fit"</fo:block>
+ <fo:block><fo:external-graphic src="file:../graphics/asf-logo-nt.png" width="60mm" height="20mm" content-width="scale-to-fit" border="solid 0.1pt" background-color="yellow"/></fo:block>
+
+ <fo:block keep-with-next.within-column="always">Properties: width="60mm" content-width="scale-to-fit"</fo:block>
+ <fo:block><fo:external-graphic src="file:../graphics/asf-logo-nt.png" width="60mm" content-width="scale-to-fit" border="solid 0.1pt" background-color="yellow"/></fo:block>
+ </fo:block>
</fo:flow>
</fo:page-sequence>
diff --git a/examples/fo/graphics/asf-logo-nt.png b/examples/fo/graphics/asf-logo-nt.png
new file mode 100644
index 000000000..40ff54916
--- /dev/null
+++ b/examples/fo/graphics/asf-logo-nt.png
Binary files differ