You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

blockcontainer.fo 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
  2. <fo:layout-master-set>
  3. <fo:simple-page-master master-name="one">
  4. <fo:region-body margin-top="25pt" margin-bottom="25pt" margin-left="50pt" margin-right="50pt" />
  5. </fo:simple-page-master>
  6. </fo:layout-master-set>
  7. <fo:page-sequence master-reference="one">
  8. <fo:flow flow-name="xsl-region-body">
  9. <fo:block text-align="center" font-size="16pt" font-weight="bold">
  10. Block Containers
  11. </fo:block>
  12. <fo:block>
  13. The fo:block-container object can be used to create an area with
  14. a different writing mode or a different reference orientation.
  15. The areas can be part of the flow or absolutely positioned.
  16. </fo:block>
  17. <fo:block>
  18. This is a normal block container within the flow layout.
  19. <fo:block-container>
  20. <fo:block>
  21. BC:A
  22. </fo:block>
  23. </fo:block-container>
  24. </fo:block>
  25. <fo:block>
  26. This block container has a different reference orientation.
  27. <fo:block-container reference-orientation="90" inline-progression-dimension="100pt">
  28. <fo:block>
  29. BC:B
  30. </fo:block>
  31. <fo:block>
  32. The areas are stacked normally but the orientation of the
  33. area is rotated 90 degrees anti-clockwise.
  34. </fo:block>
  35. <fo:block>
  36. The blocks continue until exhausted as the layout
  37. height of this container is fixed in the parent
  38. block progression dimension. The clipping of the result
  39. is determined by the overflow property. The block
  40. progression dimension of this container is effectively
  41. infinite.
  42. </fo:block>
  43. </fo:block-container>
  44. </fo:block>
  45. <fo:block>
  46. This block container has a different reference orientation.
  47. <fo:block-container reference-orientation="270" inline-progression-dimension="100pt">
  48. <fo:block>
  49. BC:B II
  50. </fo:block>
  51. <fo:block>
  52. The areas are stacked normally but the orientation of the
  53. area is rotated 90 degrees clockwise.
  54. </fo:block>
  55. <fo:block>
  56. The blocks continue until exhausted as the layout
  57. height of this container is fixed in the parent
  58. block progression dimension. The clipping of the result
  59. is determined by the overflow property.
  60. </fo:block>
  61. </fo:block-container>
  62. </fo:block>
  63. <fo:block>
  64. This block container has a different reference orientation.
  65. <fo:block-container reference-orientation="180" inline-progression-dimension="100pt">
  66. <fo:block>
  67. BC:B III
  68. </fo:block>
  69. <fo:block>
  70. The areas are stacked normally but the orientation of the
  71. area is rotated 180 degrees clockwise.
  72. </fo:block>
  73. <fo:block>
  74. This block container behaves as part of the flow except
  75. the contents are drawn rotated within the viewport by
  76. 180 degrees.
  77. </fo:block>
  78. </fo:block-container>
  79. </fo:block>
  80. <fo:block>
  81. different writing mode
  82. <fo:block-container writing-mode="rl">
  83. <fo:block>
  84. BC:C
  85. </fo:block>
  86. <fo:block>
  87. The areas in this block are stacked according to the rl (tb)
  88. writing mode.
  89. </fo:block>
  90. </fo:block-container>
  91. </fo:block>
  92. <fo:block>
  93. The next block-container has an absolute position. It does
  94. not affect the flow layout of other blocks.
  95. <fo:block-container absolute-position="absolute"
  96. left="20pt" top="400pt" right="220pt" bottom="550pt">
  97. <fo:block>
  98. BC:D
  99. </fo:block>
  100. <fo:block>
  101. This is a normal block that is confined to the
  102. block container.
  103. </fo:block>
  104. </fo:block-container>
  105. </fo:block>
  106. <fo:block>
  107. The next block-container has an absolute position. It does
  108. not affect the flow layout of other blocks. This time with
  109. the reference-orientation set.
  110. <fo:block-container reference-orientation="270" absolute-position="absolute"
  111. left="400pt" top="370pt" right="500pt" bottom="270pt">
  112. <fo:block>
  113. BC:E
  114. </fo:block>
  115. <fo:block>
  116. This is a normal block that is confined to the
  117. block container.
  118. </fo:block>
  119. </fo:block-container>
  120. </fo:block>
  121. <fo:block break-after="page">
  122. End of page.
  123. </fo:block>
  124. <fo:block>
  125. The next block-container tests the clipping.
  126. <fo:block-container reference-orientation="180" absolute-position="absolute"
  127. right="100pt" bottom="550pt" left="200pt" top="700pt"
  128. overflow="hidden">
  129. <fo:block>
  130. BC:F
  131. </fo:block>
  132. <fo:block>
  133. This is a normal block that is confined to the
  134. block container. It also has contents that are
  135. larger than the block-container so that this text
  136. will be clipped to the viewport.
  137. </fo:block>
  138. </fo:block-container>
  139. </fo:block>
  140. <fo:block>
  141. The next block-container tests error-if-overflow.
  142. <fo:block-container reference-orientation="90" absolute-position="absolute"
  143. bottom="220pt" left="600pt" top="320pt" right="700pt"
  144. overflow="error-if-overflow">
  145. <fo:block>
  146. BC:G
  147. </fo:block>
  148. <fo:block>
  149. This is a normal block that is confined to the
  150. block container. It also has contents that are
  151. larger than the block-container so that this text
  152. will be clipped to the viewport.
  153. </fo:block>
  154. </fo:block-container>
  155. </fo:block>
  156. </fo:flow>
  157. </fo:page-sequence>
  158. </fo:root>