Revision: 11843
http://sourceforge.net/p/foray/code/11843
Author: victormote
Date: 2021-01-20 17:30:03 +0000 (Wed, 20 Jan 2021)
Log Message:
-----------
Add SVG test documents for linear and radial gradients.
Modified Paths:
--------------
trunk/foray/master/dist/resource/fo-examples/basic/graphics.fo
Modified: trunk/foray/master/dist/resource/fo-examples/basic/graphics.fo
===================================================================
--- trunk/foray/master/dist/resource/fo-examples/basic/graphics.fo 2021-01-20 15:58:55 UTC (rev 11842)
+++ trunk/foray/master/dist/resource/fo-examples/basic/graphics.fo 2021-01-20 17:30:03 UTC (rev 11843)
@@ -126,94 +126,180 @@
<fo:page-sequence master-reference="psmOddEven">
<fo:flow flow-name="xsl-region-body">
+
<fo:block
font-size="16pt"
font-weight="bold"
space-before="2em"
- space-after="2em">An SVG graphic</fo:block>
+ space-after="2em">An EPS graphic (Bar Code)</fo:block>
<fo:block>
- <fo:external-graphic src="url('../svg/boxes.svg')"/>
+ <fo:external-graphic src="url('../graphics/barcode1.eps')"
+ content-height="2in"/>
</fo:block>
+
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="psmOddEven">
<fo:flow flow-name="xsl-region-body">
+
<fo:block
font-size="16pt"
font-weight="bold"
space-before="2em"
- space-after="2em">An SVG graphic with Text</fo:block>
+ space-after="2em">An EPS graphic (Coffee Shop Symbol)</fo:block>
<fo:block>
- <fo:external-graphic src="url('../svg/text-001.svg')"/>
+ <fo:external-graphic src="url('../graphics/29_coffeeshop_inv.ps')"
+ content-height="2in"/>
</fo:block>
+
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="psmOddEven">
<fo:flow flow-name="xsl-region-body">
+
<fo:block
font-size="16pt"
font-weight="bold"
space-before="2em"
- space-after="2em">An SVG graphic with Text from an Embedded Font</fo:block>
+ space-after="2em">An Embedded PDF</fo:block>
<fo:block>
- <fo:external-graphic src="url('../svg/font-embed.svg')"/>
+ <fo:external-graphic src="url('../graphics/01_telephone_inv.pdf')"
+ content-height="2in"/>
</fo:block>
+
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="psmOddEven">
<fo:flow flow-name="xsl-region-body">
-
<fo:block
font-size="16pt"
font-weight="bold"
space-before="2em"
- space-after="2em">An EPS graphic (Bar Code)</fo:block>
+ space-after="2em">An SVG graphic</fo:block>
<fo:block>
- <fo:external-graphic src="url('../graphics/barcode1.eps')"
- content-height="2in"/>
+ <fo:external-graphic src="url('../svg/boxes.svg')"/>
</fo:block>
-
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="psmOddEven">
<fo:flow flow-name="xsl-region-body">
-
<fo:block
font-size="16pt"
font-weight="bold"
space-before="2em"
- space-after="2em">An EPS graphic (Coffee Shop Symbol)</fo:block>
+ space-after="2em">An SVG graphic with Text</fo:block>
<fo:block>
- <fo:external-graphic src="url('../graphics/29_coffeeshop_inv.ps')"
- content-height="2in"/>
+ <fo:external-graphic src="url('../svg/text-001.svg')"/>
</fo:block>
-
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="psmOddEven">
<fo:flow flow-name="xsl-region-body">
-
<fo:block
font-size="16pt"
font-weight="bold"
space-before="2em"
- space-after="2em">An Embedded PDF</fo:block>
+ space-after="2em">An SVG graphic with Text from an Embedded Font. The font chosen is called "Saturn" and was
+chosen primarily because it is in the public domain and because it is not likely to be confused with another typeface.
+Specifically, each glyph in the font looks like it is painted onto the planet Saturn.</fo:block>
<fo:block>
- <fo:external-graphic src="url('../graphics/01_telephone_inv.pdf')"
- content-height="2in"/>
+ <fo:external-graphic src="url('../svg/font-embed.svg')"/>
</fo:block>
+</fo:flow>
+</fo:page-sequence>
+
+
+<fo:page-sequence master-reference="psmOddEven">
+<fo:flow flow-name="xsl-region-body">
+ <fo:block
+ font-size="16pt"
+ font-weight="bold"
+ space-before="2em"
+ space-after="2em">An SVG graphic containing two linear gradients.</fo:block>
+
+ <fo:block>See https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Gradients for baseline.
+ <fo:instream-foreign-object>
+
+<svg
+ version="1.1"
+ xmlns="http://www.w3.org/2000/svg" width="120" height="240">
+ <defs>
+ <linearGradient id="Gradient1">
+ <stop class="stop1" offset="0%"/>
+ <stop class="stop2" offset="50%"/>
+ <stop class="stop3" offset="100%"/>
+ </linearGradient>
+ <linearGradient id="Gradient2" x1="0" x2="0" y1="0" y2="1">
+ <stop offset="0%" stop-color="red"/>
+ <stop offset="50%" stop-color="black" stop-opacity="0"/>
+ <stop offset="100%" stop-color="blue"/>
+ </linearGradient>
+ <style type="text/css"><![CDATA[
+ #rect1 { fill: url(#Gradient1); }
+ .stop1 { stop-color: red; }
+ .stop2 { stop-color: black; stop-opacity: 0; }
+ .stop3 { stop-color: blue; }
+ ]]></style>
+ </defs>
+
+ <rect id="rect1" x="10" y="10" rx="15" ry="15" width="100" height="100"/>
+ <rect x="10" y="120" rx="15" ry="15" width="100" height="100" fill="url(#Gradient2)"/>
+</svg>
+
+ </fo:instream-foreign-object>
+ </fo:block>
</fo:flow>
</fo:page-sequence>
+
+
+
+
<fo:page-sequence master-reference="psmOddEven">
<fo:flow flow-name="xsl-region-body">
+ <fo:block
+ font-size="16pt"
+ font-weight="bold"
+ space-before="2em"
+ space-after="2em">An SVG graphic containing two radial gradients.</fo:block>
+ <fo:block>See https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Gradients for baseline.
+ <fo:instream-foreign-object>
+<svg
+ version="1.1" xmlns="http://www.w3.org/2000/svg"
+ width="120" height="240">
+ <defs>
+ <radialGradient id="RadialGradient1">
+ <stop offset="0%" stop-color="red"/>
+ <stop offset="100%" stop-color="blue"/>
+ </radialGradient>
+ <radialGradient id="RadialGradient2" cx="0.25" cy="0.25" r="0.25">
+ <stop offset="0%" stop-color="red"/>
+ <stop offset="100%" stop-color="blue"/>
+ </radialGradient>
+ </defs>
+
+ <rect x="10" y="10" rx="15" ry="15" width="100" height="100" fill="url(#RadialGradient1)"/>
+ <rect x="10" y="120" rx="15" ry="15" width="100" height="100" fill="url(#RadialGradient2)"/>
+
+</svg>
+ </fo:instream-foreign-object>
+ </fo:block>
+</fo:flow>
+</fo:page-sequence>
+
+
+
+
+<fo:page-sequence master-reference="psmOddEven">
+<fo:flow flow-name="xsl-region-body">
+
<fo:block
font-size="16pt"
font-weight="bold"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|