]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
external-graphic property demonstration section.
authorJeremias Maerki <jeremias@apache.org>
Wed, 31 Aug 2005 13:23:01 +0000 (13:23 +0000)
committerJeremias Maerki <jeremias@apache.org>
Wed, 31 Aug 2005 13:23:01 +0000 (13:23 +0000)
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

examples/fo/basic/images.fo
examples/fo/graphics/asf-logo-nt.png [new file with mode: 0644]

index 025fea465de674163dac9b6c195d9ee822e6f656..5ad915385ce5a9e9396486d22a722d8cd2ee674e 100644 (file)
   <!--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">
 <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 (file)
index 0000000..40ff549
Binary files /dev/null and b/examples/fo/graphics/asf-logo-nt.png differ