diff options
author | Keiron Liddle <keiron@apache.org> | 2002-11-12 09:15:53 +0000 |
---|---|---|
committer | Keiron Liddle <keiron@apache.org> | 2002-11-12 09:15:53 +0000 |
commit | f2e283049adeebd2a751ecc8eed02dbef4d34074 (patch) | |
tree | 051634effce592cad1cabba04be94d34034e2a85 | |
parent | ccea3d332e7ff9a0f7b9ff60bf8a760b9214b0a9 (diff) | |
download | xmlgraphics-fop-f2e283049adeebd2a751ecc8eed02dbef4d34074.tar.gz xmlgraphics-fop-f2e283049adeebd2a751ecc8eed02dbef4d34074.zip |
added svg/instream foreign object embedding examples
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195508 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/documentation/content/xdocs/dev/examples.xml | 20 | ||||
-rw-r--r-- | src/documentation/content/xdocs/fo/blocks.ent | 21 | ||||
-rw-r--r-- | src/documentation/content/xdocs/fo/embed.fo | 94 |
3 files changed, 135 insertions, 0 deletions
diff --git a/src/documentation/content/xdocs/dev/examples.xml b/src/documentation/content/xdocs/dev/examples.xml index 1773b58db..008f04537 100644 --- a/src/documentation/content/xdocs/dev/examples.xml +++ b/src/documentation/content/xdocs/dev/examples.xml @@ -40,5 +40,25 @@ Embedding images in FO: </table> </p> </section> + <section> + <title>Instream Foreign Object Examples</title> + <p> +Instream Foreign Object images in FO, there are more on the +<link href="svg.html">SVG Page</link>: + <table> + <caption>Images in FO</caption> + <tr> + <th>description</th> + <th>fo file</th> + <th>pdf result</th> + </tr> + <tr> + <td>embedding svg in viewport</td> + <td><link href="../fo/embed.fo">embed.fo</link></td> + <td><link href="../fo/embed.fo.pdf">embed.fo.pdf</link></td> + </tr> + </table> + </p> + </section> </body> </document> diff --git a/src/documentation/content/xdocs/fo/blocks.ent b/src/documentation/content/xdocs/fo/blocks.ent new file mode 100644 index 000000000..f8b70b4be --- /dev/null +++ b/src/documentation/content/xdocs/fo/blocks.ent @@ -0,0 +1,21 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"> + +<rect x="0" y="0" width="25" height="25" style="fill:red"/> +<rect x="25" y="0" width="25" height="25" style="fill:black"/> +<rect x="50" y="0" width="25" height="25" style="fill:orange"/> +<rect x="75" y="0" width="25" height="25" style="fill:black"/> +<rect x="0" y="25" width="25" height="25" style="fill:black"/> +<rect x="25" y="25" width="25" height="25" style="fill:green"/> +<rect x="50" y="25" width="25" height="25" style="fill:black"/> +<rect x="75" y="25" width="25" height="25" style="fill:blue"/> +<rect x="0" y="50" width="25" height="25" style="fill:yellow"/> +<rect x="25" y="50" width="25" height="25" style="fill:black"/> +<rect x="50" y="50" width="25" height="25" style="fill:purple"/> +<rect x="75" y="50" width="25" height="25" style="fill:black"/> +<rect x="0" y="75" width="25" height="25" style="fill:black"/> +<rect x="25" y="75" width="25" height="25" style="fill:violet"/> +<rect x="50" y="75" width="25" height="25" style="fill:black"/> +<rect x="75" y="75" width="25" height="25" style="fill:cyan"/> + +</svg> + diff --git a/src/documentation/content/xdocs/fo/embed.fo b/src/documentation/content/xdocs/fo/embed.fo new file mode 100644 index 000000000..04ec81161 --- /dev/null +++ b/src/documentation/content/xdocs/fo/embed.fo @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE root [ +<!ENTITY svgimage SYSTEM "blocks.ent"> +]> + +<fo:root font-family="Times Roman" font-size="12pt" 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" text-align="center">Embedding SVG in Viewport</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:instream-foreign-object width="100pt" height="100pt" content-width="50pt" content-height="50pt">&svgimage;</fo:instream-foreign-object>), start +(<fo:instream-foreign-object width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="start">&svgimage;</fo:instream-foreign-object>), center +(<fo:instream-foreign-object width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="center">&svgimage;</fo:instream-foreign-object>), end +(<fo:instream-foreign-object width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="end">&svgimage;</fo:instream-foreign-object>), before +(<fo:instream-foreign-object width="100pt" height="100pt" content-width="50pt" content-height="50pt" display-align="before">&svgimage;</fo:instream-foreign-object>), center +(<fo:instream-foreign-object width="100pt" height="100pt" content-width="50pt" content-height="50pt" display-align="center">&svgimage;</fo:instream-foreign-object>), after +(<fo:instream-foreign-object width="100pt" height="100pt" content-width="50pt" content-height="50pt" display-align="after">&svgimage;</fo:instream-foreign-object>), start-before +(<fo:instream-foreign-object width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="start" display-align="before">&svgimage;</fo:instream-foreign-object>), start-center +(<fo:instream-foreign-object width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="start" display-align="center">&svgimage;</fo:instream-foreign-object>), start-after +(<fo:instream-foreign-object width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="start" display-align="after">&svgimage;</fo:instream-foreign-object>), center-before +(<fo:instream-foreign-object width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="center" display-align="before">&svgimage;</fo:instream-foreign-object>), center-center +(<fo:instream-foreign-object width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="center" display-align="center">&svgimage;</fo:instream-foreign-object>), center-after +(<fo:instream-foreign-object width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="center" display-align="after">&svgimage;</fo:instream-foreign-object>), end-before +(<fo:instream-foreign-object width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="end" display-align="before">&svgimage;</fo:instream-foreign-object>), end-center +(<fo:instream-foreign-object width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="end" display-align="center">&svgimage;</fo:instream-foreign-object>), end-after +(<fo:instream-foreign-object width="100pt" height="100pt" content-width="50pt" content-height="50pt" text-align="end" display-align="after">&svgimage;</fo:instream-foreign-object>). + </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:instream-foreign-object width="50pt" height="50pt" overflow="hidden">&svgimage;</fo:instream-foreign-object>), start +(<fo:instream-foreign-object width="50pt" height="50pt" overflow="hidden" text-align="start">&svgimage;</fo:instream-foreign-object>), center +(<fo:instream-foreign-object width="50pt" height="50pt" overflow="hidden" text-align="center">&svgimage;</fo:instream-foreign-object>), end +(<fo:instream-foreign-object width="50pt" height="50pt" overflow="hidden" text-align="end">&svgimage;</fo:instream-foreign-object>), before +(<fo:instream-foreign-object width="50pt" height="50pt" overflow="hidden" display-align="before">&svgimage;</fo:instream-foreign-object>), center +(<fo:instream-foreign-object width="50pt" height="50pt" overflow="hidden" display-align="center">&svgimage;</fo:instream-foreign-object>), after +(<fo:instream-foreign-object width="50pt" height="50pt" overflow="hidden" display-align="after">&svgimage;</fo:instream-foreign-object>), start-before +(<fo:instream-foreign-object width="50pt" height="50pt" overflow="hidden" text-align="start" display-align="before">&svgimage;</fo:instream-foreign-object>), start-center +(<fo:instream-foreign-object width="50pt" height="50pt" overflow="hidden" text-align="start" display-align="center">&svgimage;</fo:instream-foreign-object>), start-after +(<fo:instream-foreign-object width="50pt" height="50pt" overflow="hidden" text-align="start" display-align="after">&svgimage;</fo:instream-foreign-object>), center-before +(<fo:instream-foreign-object width="50pt" height="50pt" overflow="hidden" text-align="center" display-align="before">&svgimage;</fo:instream-foreign-object>), center-center +(<fo:instream-foreign-object width="50pt" height="50pt" overflow="hidden" text-align="center" display-align="center">&svgimage;</fo:instream-foreign-object>), center-after +(<fo:instream-foreign-object width="50pt" height="50pt" overflow="hidden" text-align="center" display-align="after">&svgimage;</fo:instream-foreign-object>), end-before +(<fo:instream-foreign-object width="50pt" height="50pt" overflow="hidden" text-align="end" display-align="before">&svgimage;</fo:instream-foreign-object>), end-center +(<fo:instream-foreign-object width="50pt" height="50pt" overflow="hidden" text-align="end" display-align="center">&svgimage;</fo:instream-foreign-object>), end-after +(<fo:instream-foreign-object width="50pt" height="50pt" overflow="hidden" text-align="end" display-align="after">&svgimage;</fo:instream-foreign-object>). + </fo:block> + + <fo:block font-size="16pt" font-weight="bold" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em">Scaling</fo:block> + <fo:block> +Non-uniform +(<fo:instream-foreign-object content-width="100pt" content-height="50pt" scaling="non-uniform" overflow="hidden" text-align="start">&svgimage;</fo:instream-foreign-object>), non-uniform +(<fo:instream-foreign-object content-width="50pt" content-height="100pt" scaling="non-uniform" overflow="hidden" text-align="start">&svgimage;</fo:instream-foreign-object>), uniform +(<fo:instream-foreign-object content-width="100pt" content-height="75pt" scaling="uniform" overflow="hidden" text-align="start">&svgimage;</fo:instream-foreign-object>), uniform +(<fo:instream-foreign-object content-width="75pt" content-height="100pt" scaling="uniform" overflow="hidden" text-align="start">&svgimage;</fo:instream-foreign-object>). + </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> + |