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 de...@apache.org on 2005/07/05 13:01:50 UTC
svn commit: r209257 - in /xmlgraphics/batik/trunk:
sources/org/apache/batik/ext/awt/image/
test-resources/org/apache/batik/bridge/
Author: deweese
Date: Tue Jul 5 04:01:45 2005
New Revision: 209257
URL: http://svn.apache.org/viewcvs?rev=209257&view=rev
Log:
1) Fixed a bug rendering images to with Graphics that don't provide a
GraphicsDevice (like SVGGraphics2D).
2) Updated URL's for load tests so they work with SVN.
Modified:
xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/GraphicsUtil.java
xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckConstrain.svg
xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckLoadAny.svg
xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckNoConstrain.svg
xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckNoLoadAny.svg
xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckConstrain.svg
xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckLoadAny.svg
xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckNoConstrain.svg
xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckNoLoadAny.svg
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/GraphicsUtil.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/GraphicsUtil.java?rev=209257&r1=209256&r2=209257&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/GraphicsUtil.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/GraphicsUtil.java Tue Jul 5 04:01:45 2005
@@ -127,12 +127,15 @@
else
at.preConcatenate(g2dAt);
- ColorModel srcCM = cr.getColorModel();
- ColorSpace g2dCS = getDestinationColorSpace(g2d);
+ ColorModel srcCM = cr.getColorModel();
ColorModel g2dCM = getDestinationColorModel(g2d);
+ ColorSpace g2dCS = null;
+ if (g2dCM != null)
+ g2dCS = g2dCM.getColorSpace();
if (g2dCS == null)
// Assume device is sRGB
g2dCS = ColorSpace.getInstance(ColorSpace.CS_sRGB);
+
ColorModel drawCM = g2dCM;
if ((g2dCM == null) || !g2dCM.hasAlpha()) {
// If we can't find out about our device or the device
@@ -513,6 +516,8 @@
return bi.getColorModel();
GraphicsConfiguration gc = g2d.getDeviceConfiguration();
+ if (gc == null)
+ return null; // Can't tell
// We are going to a BufferedImage but no hint was provided
// so we can't determine the destination Color Model.
Modified: xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckConstrain.svg
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckConstrain.svg?rev=209257&r1=209256&r2=209257&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckConstrain.svg (original)
+++ xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckConstrain.svg Tue Jul 5 04:01:45 2005
@@ -33,6 +33,6 @@
onload="runTest()">
<test:testResult id="testResult" result="passed"/>
- <script type="text/ecmascript" xlink:href="http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-batik/test-resources/org/apache/batik/bridge/iWasLoaded.js?content-type=text/plain" />
+ <script type="text/ecmascript" xlink:href="http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/iWasLoaded.js?content-type=text/plain" />
</svg>
Modified: xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckLoadAny.svg
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckLoadAny.svg?rev=209257&r1=209256&r2=209257&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckLoadAny.svg (original)
+++ xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckLoadAny.svg Tue Jul 5 04:01:45 2005
@@ -33,6 +33,6 @@
onload="runTest()">
<test:testResult id="testResult" result="failed" errorCode="ecmascript.not.loaded"/>
- <script type="text/ecmascript" xlink:href="http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-batik/test-resources/org/apache/batik/bridge/iWasLoadedToo.js?content-type=text/plain" />
+ <script type="text/ecmascript" xlink:href="http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/iWasLoadedToo.js?content-type=text/plain" />
</svg>
Modified: xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckNoConstrain.svg
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckNoConstrain.svg?rev=209257&r1=209256&r2=209257&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckNoConstrain.svg (original)
+++ xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckNoConstrain.svg Tue Jul 5 04:01:45 2005
@@ -33,6 +33,6 @@
onload="runTest()">
<test:testResult id="testResult" result="failed" errorCode="ecmascript.not.loaded"/>
- <script type="text/ecmascript" xlink:href="http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-batik/test-resources/org/apache/batik/bridge/iWasLoadedToo.js?content-type=text/plain" />
+ <script type="text/ecmascript" xlink:href="http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/iWasLoadedToo.js?content-type=text/plain" />
</svg>
Modified: xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckNoLoadAny.svg
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckNoLoadAny.svg?rev=209257&r1=209256&r2=209257&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckNoLoadAny.svg (original)
+++ xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/ecmaCheckNoLoadAny.svg Tue Jul 5 04:01:45 2005
@@ -33,6 +33,6 @@
width="450" height="500" viewBox="0 0 450 500">
<test:testResult id="testResult" result="passed"/>
- <script type="text/ecmascript" xlink:href="http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-batik/test-resources/org/apache/batik/bridge/iWasLoaded.js?content-type=text/plain" />
+ <script type="text/ecmascript" xlink:href="http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/iWasLoaded.js?content-type=text/plain" />
</svg>
Modified: xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckConstrain.svg
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckConstrain.svg?rev=209257&r1=209256&r2=209257&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckConstrain.svg (original)
+++ xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckConstrain.svg Tue Jul 5 04:01:45 2005
@@ -31,6 +31,6 @@
width="450" height="500" viewBox="0 0 450 500">
<test:testResult id="testResult" result="passed" />
- <script type="application/java-archive" xlink:href="http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-batik/test-resources/org/apache/batik/bridge/IWasLoaded.jar" />
+ <script type="application/java-archive" xlink:href="http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/IWasLoaded.jar" />
</svg>
Modified: xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckLoadAny.svg
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckLoadAny.svg?rev=209257&r1=209256&r2=209257&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckLoadAny.svg (original)
+++ xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckLoadAny.svg Tue Jul 5 04:01:45 2005
@@ -31,6 +31,6 @@
width="450" height="500" viewBox="0 0 450 500">
<test:testResult id="testResult" result="failed" errorCode="IWasLoadedToo.jar should have been loaded"/>
- <script type="application/java-archive" xlink:href="http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-batik/test-resources/org/apache/batik/bridge/IWasLoadedToo.jar" />
+ <script type="application/java-archive" xlink:href="http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/IWasLoadedToo.jar" />
</svg>
Modified: xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckNoConstrain.svg
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckNoConstrain.svg?rev=209257&r1=209256&r2=209257&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckNoConstrain.svg (original)
+++ xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckNoConstrain.svg Tue Jul 5 04:01:45 2005
@@ -31,6 +31,6 @@
width="450" height="500" viewBox="0 0 450 500">
<test:testResult id="testResult" result="failed" errorCode="IWasLoadedToo.jar should have been loaded"/>
- <script type="application/java-archive" xlink:href="http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-batik/test-resources/org/apache/batik/bridge/IWasLoadedToo.jar" />
+ <script type="application/java-archive" xlink:href="http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/IWasLoadedToo.jar" />
</svg>
Modified: xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckNoLoadAny.svg
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckNoLoadAny.svg?rev=209257&r1=209256&r2=209257&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckNoLoadAny.svg (original)
+++ xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/jarCheckNoLoadAny.svg Tue Jul 5 04:01:45 2005
@@ -31,6 +31,6 @@
width="450" height="500" viewBox="0 0 450 500">
<test:testResult id="testResult" result="passed" />
- <script type="application/java-archive" xlink:href="http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-batik/test-resources/org/apache/batik/bridge/IWasLoaded.jar" />
+ <script type="application/java-archive" xlink:href="http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/test-resources/org/apache/batik/bridge/IWasLoaded.jar" />
</svg>