aboutsummaryrefslogtreecommitdiffstats
path: root/docs/examples
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2000-09-19 00:10:08 +0000
committerKeiron Liddle <keiron@apache.org>2000-09-19 00:10:08 +0000
commit1dbd1bb9b21c767a8edda5915a3a728618643584 (patch)
tree21db5a38e628bb3828a0cb290a1da8f21c9ca871 /docs/examples
parent823e245f5350eb6886906c5917b0b13635438468 (diff)
downloadxmlgraphics-fop-1dbd1bb9b21c767a8edda5915a3a728618643584.tar.gz
xmlgraphics-fop-1dbd1bb9b21c767a8edda5915a3a728618643584.zip
some examples for placing svg within blocks and text
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193705 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/examples')
-rw-r--r--docs/examples/fo/instream.fo132
1 files changed, 132 insertions, 0 deletions
diff --git a/docs/examples/fo/instream.fo b/docs/examples/fo/instream.fo
new file mode 100644
index 000000000..327a6aa64
--- /dev/null
+++ b/docs/examples/fo/instream.fo
@@ -0,0 +1,132 @@
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+<fo:layout-master-set>
+ <fo:simple-page-master master-name="one">
+ <fo:region-body margin-top="25pt" margin-bottom="25pt" margin-left="50pt" margin-right="50pt" />
+ </fo:simple-page-master>
+</fo:layout-master-set>
+<fo:page-sequence master-name="one">
+<fo:flow flow-name="xsl-region-body">
+<fo:instream-foreign-object>
+<svg:svg width="250" height="50">
+ <svg:g style="fill:red; stroke:#000000">
+ <svg:rect x="0" y="0" width="15" height="15"/>
+ <svg:rect x="5" y="5" width="15" height="15"/>
+ </svg:g>
+ <svg:text x="10" y="30">SVG placed in flow before anything</svg:text>
+</svg:svg>
+</fo:instream-foreign-object>
+ <fo:block>This is used to show how foreign objects are placed in a line area.</fo:block>
+<fo:instream-foreign-object>
+<svg:svg width="250" height="50">
+ <svg:g style="fill:red; stroke:#000000">
+ <svg:rect x="0" y="0" width="15" height="15"/>
+ <svg:rect x="5" y="5" width="15" height="15"/>
+ </svg:g>
+ <svg:text x="10" y="30">SVG placed in flow after a block</svg:text>
+</svg:svg>
+</fo:instream-foreign-object>
+ <fo:block>
+ Some block text to separate instream objects.
+ </fo:block>
+ <fo:block>
+ Some text before
+<fo:instream-foreign-object>
+<svg:svg width="20" height="20">
+ <svg:g style="fill:red; stroke:#000000">
+ <svg:rect x="0" y="0" width="15" height="15"/>
+ <svg:rect x="5" y="5" width="15" height="15"/>
+ </svg:g>
+</svg:svg>
+</fo:instream-foreign-object>
+ and some after the svg element.
+ </fo:block>
+ <fo:block>
+ A text line below the instream object.
+ </fo:block>
+ <fo:block>
+<fo:instream-foreign-object>
+<svg:svg width="250" height="50">
+ <svg:g style="fill:red; stroke:#000000">
+ <svg:rect x="0" y="0" width="15" height="15"/>
+ <svg:rect x="5" y="5" width="15" height="15"/>
+ </svg:g>
+ <svg:text x="10" y="30">SVG placed in a block</svg:text>
+</svg:svg>
+</fo:instream-foreign-object>
+ </fo:block>
+ <fo:block>
+ A text line below the block.
+ </fo:block>
+ <fo:block>
+ A text line with an instream foreign object that is before the line break.
+<fo:instream-foreign-object>
+<svg:svg width="50" height="50">
+ <svg:g style="fill:red; stroke:#000000">
+ <svg:rect x="0" y="0" width="15" height="15"/>
+ <svg:rect x="5" y="5" width="15" height="15"/>
+ </svg:g>
+ <svg:rect x="0" y="0" width="49" height="49"/>
+</svg:svg>
+</fo:instream-foreign-object>
+With some text on the next line. With a bit more text to go over the to the next line.
+ </fo:block>
+ <fo:block>
+ A text line with an instream foreign object that is after the line break.
+With some text on the next line. With a bit
+<fo:instream-foreign-object>
+<svg:svg width="50" height="50">
+ <svg:g style="fill:red; stroke:#000000">
+ <svg:rect x="0" y="0" width="15" height="15"/>
+ <svg:rect x="5" y="5" width="15" height="15"/>
+ </svg:g>
+ <svg:rect x="0" y="0" width="49" height="49"/>
+</svg:svg>
+</fo:instream-foreign-object>
+more text to go over the to the next line.
+ </fo:block>
+ <fo:block>
+ A text line with an instream foreign object that is over the line break.
+With some text
+<fo:instream-foreign-object>
+<svg:svg width="50" height="50">
+ <svg:g style="fill:red; stroke:#000000">
+ <svg:rect x="0" y="0" width="15" height="15"/>
+ <svg:rect x="5" y="5" width="15" height="15"/>
+ </svg:g>
+ <svg:rect x="0" y="0" width="49" height="49"/>
+</svg:svg>
+</fo:instream-foreign-object>
+on the next line. With a bit more text to go over the to the next line to
+see it handles it properly.
+ </fo:block>
+ <fo:block>
+ The next block has an instream object wider than the area.
+ </fo:block>
+ <fo:block>
+<fo:instream-foreign-object>
+<svg:svg width="550" height="50">
+ <svg:g style="fill:red; stroke:#000000">
+ <svg:rect x="0" y="0" width="15" height="15"/>
+ <svg:rect x="5" y="5" width="15" height="15"/>
+ </svg:g>
+ <svg:rect x="0" y="0" width="549" height="49"/>
+ <svg:text x="10" y="30">SVG placed in a really wide block</svg:text>
+</svg:svg>
+</fo:instream-foreign-object>
+ </fo:block>
+ <fo:block>
+ This block has an instream object wider than the area after this text
+<fo:instream-foreign-object>
+<svg:svg width="550" height="50">
+ <svg:g style="fill:red; stroke:#000000">
+ <svg:rect x="0" y="0" width="15" height="15"/>
+ <svg:rect x="5" y="5" width="15" height="15"/>
+ </svg:g>
+ <svg:rect x="0" y="0" width="549" height="49"/>
+ <svg:text x="10" y="30">SVG placed in a really wide block</svg:text>
+</svg:svg>
+</fo:instream-foreign-object>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+</fo:root>