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 2012/05/18 13:05:03 UTC
svn commit: r1340064 -
/xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/geom/ExtendedGeneralPath.java
Author: deweese
Date: Fri May 18 11:05:02 2012
New Revision: 1340064
URL: http://svn.apache.org/viewvc?rev=1340064&view=rev
Log:
When checking ArcTo radii pad a little so the math doesn't fail later
Modified:
xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/geom/ExtendedGeneralPath.java
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/geom/ExtendedGeneralPath.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/geom/ExtendedGeneralPath.java?rev=1340064&r1=1340063&r2=1340064&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/geom/ExtendedGeneralPath.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/geom/ExtendedGeneralPath.java Fri May 18 11:05:02 2012
@@ -194,9 +194,10 @@ public class ExtendedGeneralPath impleme
double Py1 = y1 * y1;
// check that radii are large enough
double radiiCheck = Px1/Prx + Py1/Pry;
- if (radiiCheck > 1) {
- rx = Math.sqrt(radiiCheck) * rx;
- ry = Math.sqrt(radiiCheck) * ry;
+ if (radiiCheck > 0.99999) { // don't cut it too close
+ double radiiScale = Math.sqrt(radiiCheck) * 1.00001;
+ rx = radiiScale * rx;
+ ry = radiiScale * ry;
Prx = rx * rx;
Pry = ry * ry;
}