aboutsummaryrefslogtreecommitdiffstats
path: root/docs/examples
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2002-08-29 10:55:53 +0000
committerKeiron Liddle <keiron@apache.org>2002-08-29 10:55:53 +0000
commit7046cf8b448ae03a2ad44d7a3ad40ae6421cf2c7 (patch)
treef7922e14502ffa402f6b2e4b89114f9b379ac8e7 /docs/examples
parentdbb12063ace6cdab9a8e27f9f03e035ab1821071 (diff)
downloadxmlgraphics-fop-7046cf8b448ae03a2ad44d7a3ad40ae6421cf2c7.tar.gz
xmlgraphics-fop-7046cf8b448ae03a2ad44d7a3ad40ae6421cf2c7.zip
some block-container examples with reference-orientation and absolute pos
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195125 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/examples')
-rw-r--r--docs/examples/fo/blockcontainer.fo170
1 files changed, 170 insertions, 0 deletions
diff --git a/docs/examples/fo/blockcontainer.fo b/docs/examples/fo/blockcontainer.fo
new file mode 100644
index 000000000..c46821887
--- /dev/null
+++ b/docs/examples/fo/blockcontainer.fo
@@ -0,0 +1,170 @@
+<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-reference="one">
+<fo:flow flow-name="xsl-region-body">
+ <fo:block text-align="center" font-size="16pt" font-weight="bold">
+ Block Containers
+ </fo:block>
+
+ <fo:block>
+ The fo:block-container object can be used to create an area with
+ a different writing mode or a different reference orientation.
+ The areas can be part of the flow or absolutely positioned.
+ </fo:block>
+
+ <fo:block>
+ This is a normal block container within the flow layout.
+ <fo:block-container>
+ <fo:block>
+ BC:A
+ </fo:block>
+ </fo:block-container>
+ </fo:block>
+
+ <fo:block>
+ This block container has a different reference orientation.
+ <fo:block-container reference-orientation="90" inline-progression-dimension="100pt">
+ <fo:block>
+ BC:B
+ </fo:block>
+ <fo:block>
+ The areas are stacked normally but the orientation of the
+ area is rotated 90 degrees anti-clockwise.
+ </fo:block>
+ <fo:block>
+ The blocks continue until exhausted as the layout
+ height of this container is fixed in the parent
+ block progression dimension. The clipping of the result
+ is determined by the overflow property. The block
+ progression dimension of this container is effectively
+ infinite.
+ </fo:block>
+ </fo:block-container>
+ </fo:block>
+
+ <fo:block>
+ This block container has a different reference orientation.
+ <fo:block-container reference-orientation="270" inline-progression-dimension="100pt">
+ <fo:block>
+ BC:B II
+ </fo:block>
+ <fo:block>
+ The areas are stacked normally but the orientation of the
+ area is rotated 90 degrees clockwise.
+ </fo:block>
+ <fo:block>
+ The blocks continue until exhausted as the layout
+ height of this container is fixed in the parent
+ block progression dimension. The clipping of the result
+ is determined by the overflow property.
+ </fo:block>
+ </fo:block-container>
+ </fo:block>
+
+ <fo:block>
+ This block container has a different reference orientation.
+ <fo:block-container reference-orientation="180" inline-progression-dimension="100pt">
+ <fo:block>
+ BC:B III
+ </fo:block>
+ <fo:block>
+ The areas are stacked normally but the orientation of the
+ area is rotated 180 degrees clockwise.
+ </fo:block>
+ <fo:block>
+ This block container behaves as part of the flow except
+ the contents are drawn rotated within the viewport by
+ 180 degrees.
+ </fo:block>
+ </fo:block-container>
+ </fo:block>
+
+ <fo:block>
+ different writing mode
+ <fo:block-container writing-mode="rl">
+ <fo:block>
+ BC:C
+ </fo:block>
+ <fo:block>
+ The areas in this block are stacked according to the rl (tb)
+ writing mode.
+ </fo:block>
+ </fo:block-container>
+ </fo:block>
+
+ <fo:block>
+ The next block-container has an absolute position. It does
+ not effect the flow layout of other blocks.
+ <fo:block-container absolute-position="absolute"
+ left="20pt" top="400pt" right="220pt" bottom="550pt">
+ <fo:block>
+ BC:D
+ </fo:block>
+ <fo:block>
+ This is a normal block that is confined to the
+ block container.
+ </fo:block>
+ </fo:block-container>
+ </fo:block>
+
+ <fo:block>
+ The next block-container has an absolute position. It does
+ not effect the flow layout of other blocks. This time with
+ the reference-orientation set.
+ <fo:block-container reference-orientation="270" absolute-position="absolute"
+ left="270pt" top="400pt" right="370pt" bottom="500pt">
+ <fo:block>
+ BC:E
+ </fo:block>
+ <fo:block>
+ This is a normal block that is confined to the
+ block container.
+ </fo:block>
+ </fo:block-container>
+ </fo:block>
+
+ <fo:block break-after="page">
+ End of page.
+ </fo:block>
+
+ <fo:block>
+ The next block-container tests the clipping.
+ <fo:block-container reference-orientation="180" absolute-position="absolute"
+ left="100pt" top="550pt" right="200pt" bottom="700pt"
+ overflow="hidden">
+ <fo:block>
+ BC:F
+ </fo:block>
+ <fo:block>
+ This is a normal block that is confined to the
+ block container. It also has contents that are
+ larger than the block-container so that this text
+ will be clipped to the viewport.
+ </fo:block>
+ </fo:block-container>
+ </fo:block>
+
+ <fo:block>
+ The next block-container tests error-if-overflow.
+ <fo:block-container reference-orientation="90" absolute-position="absolute"
+ left="220pt" top="600pt" right="320pt" bottom="700pt"
+ overflow="error-if-overflow">
+ <fo:block>
+ BC:G
+ </fo:block>
+ <fo:block>
+ This is a normal block that is confined to the
+ block container. It also has contents that are
+ larger than the block-container so that this text
+ will be clipped to the viewport.
+ </fo:block>
+ </fo:block-container>
+ </fo:block>
+
+ </fo:flow>
+ </fo:page-sequence>
+</fo:root>