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 ca...@apache.org on 2006/03/14 23:23:17 UTC

svn commit: r385918 - /xmlgraphics/batik/branches/svg11/sources/org/apache/batik/bridge/SVGSVGElementBridge.java

Author: cam
Date: Tue Mar 14 14:23:16 2006
New Revision: 385918

URL: http://svn.apache.org/viewcvs?rev=385918&view=rev
Log:
1. Fixed NPE when modifying viewBox on an 'svg' element that involved only a
   translation.

Modified:
    xmlgraphics/batik/branches/svg11/sources/org/apache/batik/bridge/SVGSVGElementBridge.java

Modified: xmlgraphics/batik/branches/svg11/sources/org/apache/batik/bridge/SVGSVGElementBridge.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/branches/svg11/sources/org/apache/batik/bridge/SVGSVGElementBridge.java?rev=385918&r1=385917&r2=385918&view=diff
==============================================================================
--- xmlgraphics/batik/branches/svg11/sources/org/apache/batik/bridge/SVGSVGElementBridge.java (original)
+++ xmlgraphics/batik/branches/svg11/sources/org/apache/batik/bridge/SVGSVGElementBridge.java Tue Mar 14 14:23:16 2006
@@ -1,6 +1,6 @@
 /*
 
-   Copyright 2001-2004  The Apache Software Foundation 
+   Copyright 2001-2004,2006  The Apache Software Foundation 
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -376,9 +376,12 @@
                 
                 if (clip != null) {
                     try {
-                        AffineTransform at;
-                        at = cgn.getPositionTransform();
-                        at = new AffineTransform(at);
+                        AffineTransform at = cgn.getPositionTransform();
+                        if (at == null) {
+                            at = new AffineTransform();
+                        } else {
+                            at = new AffineTransform(at);
+                        }
                         at.concatenate(newVT);
                         at = at.createInverse(); // clip in user space
                         clip = at.createTransformedShape(clip);