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:22:57 UTC
svn commit: r385917 -
/xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGSVGElementBridge.java
Author: cam
Date: Tue Mar 14 14:22:55 2006
New Revision: 385917
URL: http://svn.apache.org/viewcvs?rev=385917&view=rev
Log:
1. Fixed NPE when modifying viewBox on an 'svg' element that involved only a
translation.
Modified:
xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGSVGElementBridge.java
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGSVGElementBridge.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGSVGElementBridge.java?rev=385917&r1=385916&r2=385917&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGSVGElementBridge.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGSVGElementBridge.java Tue Mar 14 14:22:55 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);