You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by je...@apache.org on 2010/09/09 10:10:19 UTC
svn commit: r995343 - in
/xmlgraphics/batik/branches/svgcolor12/samples/tests/spec12/paints:
colorFunctions.svg colorFunctionsDevice.svg
Author: jeremias
Date: Thu Sep 9 08:10:18 2010
New Revision: 995343
URL: http://svn.apache.org/viewvc?rev=995343&view=rev
Log:
Improved the tests by selecting better fallback colors to indicate if something's not supported.
Modified:
xmlgraphics/batik/branches/svgcolor12/samples/tests/spec12/paints/colorFunctions.svg
xmlgraphics/batik/branches/svgcolor12/samples/tests/spec12/paints/colorFunctionsDevice.svg
Modified: xmlgraphics/batik/branches/svgcolor12/samples/tests/spec12/paints/colorFunctions.svg
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/branches/svgcolor12/samples/tests/spec12/paints/colorFunctions.svg?rev=995343&r1=995342&r2=995343&view=diff
==============================================================================
--- xmlgraphics/batik/branches/svgcolor12/samples/tests/spec12/paints/colorFunctions.svg (original)
+++ xmlgraphics/batik/branches/svgcolor12/samples/tests/spec12/paints/colorFunctions.svg Thu Sep 9 08:10:18 2010
@@ -41,81 +41,85 @@
</defs>
<g id="testContent" class="legend" style="text-anchor:middle">
- <text x="225" y="40" class="title">
- SVG Color 1.2 Functions (Calibrated Colors)
- </text>
+ <text x="225" y="40" class="title">
+ SVG Color 1.2 Functions (Calibrated Colors)
+ </text>
- <g stroke="black" stroke-width="2" transform="translate(35, 90)">
-
- <rect y="0" width="40" height="40" fill="#FF0000 icc-named-color(MyNamedColors, Postgelb)"/>
-
- <rect y="60" width="40" height="40" fill="#FF0000 icc-named-color(MissingProfile, SomeName)"/>
-
- <rect y="120" width="40" height="40" fill="#FF0000 cielab(83.25, 16.45, 96.89)"/>
-
- <rect y="180" width="40" height="40" fill="#FF0000 cielch(83.25, 98.28, 80.36)"/>
-
- </g>
-
- <!--
- Unsupported color functions or missing profiles will result in the boxes appearing
- red meaning that the sRGB fallback was used. All but the second box of the four
- should be a darker yellow.
- -->
-
- <g text-anchor="start" transform="translate(90, 110)">
- <text y="0">
- <tspan>fill="#FF0000 icc-named-color(MyNamedColors, Postgelb)"</tspan>
- <tspan x="0" dy="12">Box should be yellow.</tspan>
- </text>
- <text y="60">
- <tspan>fill="#FF0000 icc-named-color(MissingProfile, SomeName)"</tspan>
- <tspan x="0" dy="12">Box should be red.</tspan>
- </text>
- <text y="120">
- <tspan>fill="#FF0000 cielab(83.25, 16.45, 96.89)"</tspan>
- <tspan x="0" dy="12">Box should be yellow.</tspan>
- </text>
- <text y="180">
- <tspan>fill="#FF0000 cielch(83.25, 98.28, 80.36)"</tspan>
- <tspan x="0" dy="12">Box should be yellow.</tspan>
- </text>
+ <g stroke="black" stroke-width="2" transform="translate(35, 90)">
+
+ <rect y="0" width="40" height="40" fill="#FF0000 icc-named-color(MyNamedColors, Postgelb)"/>
+
+ <rect y="60" width="40" height="40" fill="#00FF00 icc-named-color(MissingProfile, SomeName)"/>
+
+ <rect y="120" width="40" height="40" fill="#FF0000 cielab(83.25, 16.45, 96.89)"/>
+
+ <rect y="180" width="40" height="40" fill="#FF0000 cielch(83.25, 98.28, 80.36)"/>
+
+ </g>
+
+ <!--
+ Unsupported color functions or missing profiles will result in the boxes appearing
+ red meaning that the sRGB fallback was used. All but the second box of the four
+ should be a darker yellow.
+ -->
+
+ <g text-anchor="start" transform="translate(90, 110)">
+ <text y="0">
+ <tspan>fill="#FF0000 icc-named-color(MyNamedColors, Postgelb)"</tspan>
+ <tspan x="0" dy="12">Box should be yellow.</tspan>
+ </text>
+ <text y="60">
+ <tspan>fill="#00FF00 icc-named-color(MissingProfile, SomeName)"</tspan>
+ <tspan x="0" dy="12">Box should be green.</tspan>
+ </text>
+ <text y="120">
+ <tspan>fill="#FF0000 cielab(83.25, 16.45, 96.89)"</tspan>
+ <tspan x="0" dy="12">Box should be yellow.</tspan>
+ </text>
+ <text y="180">
+ <tspan>fill="#FF0000 cielch(83.25, 98.28, 80.36)"</tspan>
+ <tspan x="0" dy="12">Box should be yellow.</tspan>
+ </text>
+ </g>
+
+ <g transform="translate(25, 360)">
+ <defs>
+ <linearGradient id="NCGradient">
+ <stop offset="10%" stop-color="#FF0000 icc-named-color(MyNamedColors, Postgelb)" />
+ <stop offset="90%" stop-color="#0000FF icc-named-color(MyNamedColors, MyRed)" />
+ </linearGradient>
+ <filter id="MyFilter" filterUnits="userSpaceOnUse" x="-50" y="-50" width="200" height="120">
+ <feGaussianBlur in="SourceAlpha" stdDeviation="4" result="blur"/>
+ <feOffset in="blur" dx="4" dy="4" result="offsetBlur"/>
+ <feSpecularLighting in="blur" surfaceScale="5" specularConstant=".75"
+ specularExponent="20" lighting-color="#bbbbbb"
+ result="specOut">
+ <fePointLight x="-5000" y="-10000" z="20000"/>
+ </feSpecularLighting>
+ <feComposite in="specOut" in2="SourceAlpha" operator="in" result="specOut"/>
+ <feComposite in="SourceGraphic" in2="specOut" operator="arithmetic"
+ k1="0" k2="1" k3="1" k4="0" result="litPaint"/>
+ <feMerge>
+ <feMergeNode in="offsetBlur"/>
+ <feMergeNode in="litPaint"/>
+ </feMerge>
+ </filter>
+ </defs>
+ <rect x="10" y="0" width="40" height="40" fill="#FF0000 icc-named-color(MyNamedColors, Postgelb)"/>
+ <rect x="80" y="0" width="100" height="40" fill="url(#NCGradient)"/>
+ <g filter="url(#MyFilter)" transform="translate(220, 0)">
+ <path d="M0,20 c20,-50 20,50 40,0 s20,50 40,0 s20,50 40,0"
+ fill="none" stroke="#FF0000 icc-named-color(MyNamedColors, Postgelb)" stroke-width="12"/>
</g>
-
- <g transform="translate(25, 360)">
- <defs>
- <linearGradient id="NCGradient">
- <stop offset="10%" stop-color="#FF0000 icc-named-color(MyNamedColors, Postgelb)" />
- <stop offset="90%" stop-color="#0000FF icc-named-color(MyNamedColors, MyRed)" />
- </linearGradient>
- <filter id="MyFilter" filterUnits="userSpaceOnUse" x="-50" y="-50" width="200" height="120">
- <feGaussianBlur in="SourceAlpha" stdDeviation="4" result="blur"/>
- <feOffset in="blur" dx="4" dy="4" result="offsetBlur"/>
- <feSpecularLighting in="blur" surfaceScale="5" specularConstant=".75"
- specularExponent="20" lighting-color="#bbbbbb"
- result="specOut">
- <fePointLight x="-5000" y="-10000" z="20000"/>
- </feSpecularLighting>
- <feComposite in="specOut" in2="SourceAlpha" operator="in" result="specOut"/>
- <feComposite in="SourceGraphic" in2="specOut" operator="arithmetic"
- k1="0" k2="1" k3="1" k4="0" result="litPaint"/>
- <feMerge>
- <feMergeNode in="offsetBlur"/>
- <feMergeNode in="litPaint"/>
- </feMerge>
- </filter>
- </defs>
- <rect x="10" y="0" width="40" height="40" fill="#FF0000 icc-named-color(MyNamedColors, Postgelb)"/>
- <rect x="80" y="0" width="100" height="40" fill="url(#NCGradient)"/>
- <g filter="url(#MyFilter)" transform="translate(220, 0)">
- <path d="M0,20 c20,-50 20,50 40,0 s20,50 40,0 s20,50 40,0"
- fill="none" stroke="#FF0000 icc-named-color(MyNamedColors, Postgelb)" stroke-width="12"/>
- </g>
-
- <rect x="0" y="30" width="400" height="20" fill="gray" opacity="0.4"/>
+
+ <rect x="0" y="30" width="400" height="20" fill="gray" opacity="0.4"/>
- </g>
- <text x="225" y="430">Opacity test with fill, gradient and filter.</text>
+ </g>
+ <text y="430">
+ <tspan x="225">Opacity test with fill, gradient and filter.</tspan>
+ <tspan x="225" dy="12">Elements should be yellow, the gradient yellow to red.</tspan>
+ </text>
+
</g>
<!-- ============================================================= -->
Modified: xmlgraphics/batik/branches/svgcolor12/samples/tests/spec12/paints/colorFunctionsDevice.svg
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/branches/svgcolor12/samples/tests/spec12/paints/colorFunctionsDevice.svg?rev=995343&r1=995342&r2=995343&view=diff
==============================================================================
--- xmlgraphics/batik/branches/svgcolor12/samples/tests/spec12/paints/colorFunctionsDevice.svg (original)
+++ xmlgraphics/batik/branches/svgcolor12/samples/tests/spec12/paints/colorFunctionsDevice.svg Thu Sep 9 08:10:18 2010
@@ -44,13 +44,13 @@
<g stroke="black" stroke-width="2" transform="translate(35, 90)">
- <rect y="0" width="40" height="40" fill="#00FF00 device-gray(0.4)"/>
+ <rect y="0" width="40" height="40" fill="#FF0000 device-gray(0.4)"/>
- <rect y="60" width="40" height="40" fill="#00FF00 device-rgb(153, 153, 122)"/>
+ <rect y="60" width="40" height="40" fill="#FF0000 device-rgb(153, 153, 122)"/>
- <rect y="120" width="40" height="40" fill="#00FF00 device-cmyk(0.0,0.0,0.2,0.4)"/>
+ <rect y="120" width="40" height="40" fill="#FF0000 device-cmyk(0.0,0.0,0.2,0.4)"/>
- <rect y="180" width="40" height="40" fill="#00FF00 device-nchannel(0.5,1.0)"/>
+ <rect y="180" width="40" height="40" fill="#FF0000 device-nchannel(0.5,1.0)"/>
</g>
@@ -62,21 +62,21 @@
<g text-anchor="start" transform="translate(90, 110)">
<text y="0">
- <tspan>#00FF00 device-gray(0.4)</tspan>
- <tspan x="0" dy="12">Gray where device-specific colors are supported, green otherwise.</tspan>
+ <tspan>#FF0000 device-gray(0.4)</tspan>
+ <tspan x="0" dy="12">Gray where device-specific colors are supported, red otherwise.</tspan>
</text>
<text y="60">
- <tspan>#00FF00 device-rgb(153, 153, 122)</tspan>
- <tspan x="0" dy="12">Khaki where device-specific colors are supported, green otherwise.</tspan>
+ <tspan>#FF0000 device-rgb(153, 153, 122)</tspan>
+ <tspan x="0" dy="12">Khaki where device-specific colors are supported, red otherwise.</tspan>
</text>
<text y="120">
- <tspan>#00FF00 device-cmyk(0.0,0.0,0.2,0.4)</tspan>
- <tspan x="0" dy="12">Khaki where device-specific colors are supported, green otherwise.</tspan>
+ <tspan>#FF0000 device-cmyk(0.0,0.0,0.2,0.4)</tspan>
+ <tspan x="0" dy="12">Khaki where device-specific colors are supported, red otherwise.</tspan>
</text>
<text y="180">
- <tspan>#00FF00 device-nchannel(0.5,1.0)</tspan>
+ <tspan>#FF0000 device-nchannel(0.5,1.0)</tspan>
<tspan x="0" dy="12">Some device-dependent color where device-specific colors are</tspan>
- <tspan x="0" dy="12">supported, green otherwise.</tspan>
+ <tspan x="0" dy="12">supported, red otherwise.</tspan>
</text>
</g>
</g>