aboutsummaryrefslogtreecommitdiffstats
path: root/docs/examples
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2001-08-30 10:09:03 +0000
committerKeiron Liddle <keiron@apache.org>2001-08-30 10:09:03 +0000
commit348228dd57dbce827a48bfdafb4fa700b2ea5a8c (patch)
treeddb5b86cf36fa92d5e3d5cd17eb7dc77ee099618 /docs/examples
parente0f188c784787183e904380600233cb46b8277ff (diff)
downloadxmlgraphics-fop-348228dd57dbce827a48bfdafb4fa700b2ea5a8c.tar.gz
xmlgraphics-fop-348228dd57dbce827a48bfdafb4fa700b2ea5a8c.zip
handles viewbox and no svg size better
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194446 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/examples')
-rw-r--r--docs/examples/svg/embedding.fo10
-rw-r--r--docs/examples/svg/external.fo5
-rw-r--r--docs/examples/svg/view.svg11
3 files changed, 21 insertions, 5 deletions
diff --git a/docs/examples/svg/embedding.fo b/docs/examples/svg/embedding.fo
index f685d5c40..a01e204a0 100644
--- a/docs/examples/svg/embedding.fo
+++ b/docs/examples/svg/embedding.fo
@@ -939,7 +939,7 @@ Sizing
<fo:table-row>
<fo:table-cell number-columns-spanned="2">
<fo:block space-before.optimum="5pt">
-Specify the size on the instream-foreign-object element. <fo:inline color="red">Note: currently not functional, bug.</fo:inline>
+Specify the size on the instream-foreign-object element.
</fo:block>
</fo:table-cell>
</fo:table-row>
@@ -948,7 +948,7 @@ Specify the size on the instream-foreign-object element. <fo:inline color="red">
<fo:table-cell>
<fo:block font-size="8pt" white-space-collapse="false" space-before.optimum="5pt">
<![CDATA[
-<fo:instream-foreign-object width="20pt" height="20pt">
+<fo:instream-foreign-object content-width="20pt" content-height="20pt">
<svg:svg>
<svg:g style="fill:red; stroke:#000000">
<svg:rect x="0" y="0" width="15" height="15"/>
@@ -962,8 +962,8 @@ Specify the size on the instream-foreign-object element. <fo:inline color="red">
</fo:table-cell>
<fo:table-cell>
<fo:block space-before.optimum="15pt">
-<!--
-<fo:instream-foreign-object width="20pt" height="20pt">
+
+<fo:instream-foreign-object content-width="20pt" content-height="20pt">
<svg:svg>
<svg:g style="fill:red; stroke:#000000">
<svg:rect x="0" y="0" width="15" height="15"/>
@@ -971,7 +971,7 @@ Specify the size on the instream-foreign-object element. <fo:inline color="red">
</svg:g>
</svg:svg>
</fo:instream-foreign-object>
--->
+
</fo:block>
</fo:table-cell>
</fo:table-row>
diff --git a/docs/examples/svg/external.fo b/docs/examples/svg/external.fo
index abd3d31b6..9d908ea96 100644
--- a/docs/examples/svg/external.fo
+++ b/docs/examples/svg/external.fo
@@ -120,6 +120,11 @@ and
</fo:block>
+ <fo:block space-before.optimum="10pt">
+This example is an svg from an external image:
+<fo:external-graphic src="file:view.svg"/>
+it has a viewbox that resizes the contents.
+ </fo:block>
</fo:flow>
</fo:page-sequence>
diff --git a/docs/examples/svg/view.svg b/docs/examples/svg/view.svg
new file mode 100644
index 000000000..4704ec9ec
--- /dev/null
+++ b/docs/examples/svg/view.svg
@@ -0,0 +1,11 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000802//EN"
+"http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd">
+
+<svg viewBox="0 0 10 10" width="20" height="20" xml:space="preserve">
+ <g style="fill:red; stroke:#000000">
+ <rect x="0" y="0" width="15" height="15"/>
+ <rect x="5" y="5" width="15" height="15"/>
+ </g>
+</svg>
+