FYI [gui] getPathIterator fixlet from GNU Classpath
Mark Wielaard
mark@klomp.org
Sun Nov 7 01:03:00 GMT 2004
Hi,
Noa created the following patch for GeneralPath for GNU Classpath.
"Without this patch we have fails in mauve in the
java.awt.geom.GeneralPath.getPathIterator test. It turns out that when
GeneralPathIterator.currentSegment(double[]) gets called and transform
is set, the transform.transform() invocation doesn't fill the resulting
double array from offset 0 but instead from offset 'pos' (which is the
position in the PathIterator). Changing this to 0, as the attached patch
does makes the two currentSegment() invocations symmetrical, and fixes
all java.awt.geom.GeneralPath.getPathIterator mauve tests."
2004-11-06 Noa Resare <noa@resare.com>
* java/awt/geom/GeneralPath.java (currentSegment):
Fix typo in transform.transform() invocation.
Committed to the gui branch.
(Twice, one with the wrong patch as show below. Then with the correct
patch and the reverse of the first one. Sorry for that.)
Cheers,
Mark
--- /home/mjw/src/classpath/java/awt/geom/GeneralPath.java Thu Oct 28 17:32:47 2004
+++ java/awt/geom/GeneralPath.java Mon Sep 27 17:35:04 2004
@@ -642,7 +642,7 @@
if (transform != null)
transform.transform( /* src */
coords, /* srcOffset */
- 0, /* dest */ coords, /* destOffset */
+ pos, /* dest */ coords, /* destOffset */
0, /* numPoints */ numCoords);
}
return seg;
--- java/awt/geom/GeneralPath.java 2004-11-07 01:56:33.000000000 +0100
+++ /home/mark/src/classpath/java/awt/geom/GeneralPath.java 2004-11-06 13:46:00.000000000 +0100
@@ -616,7 +616,7 @@
if (transform != null)
transform.transform( /* src */
coords, /* srcOffset */
- pos, /* dest */ coords, /* destOffset */
+ 0, /* dest */ coords, /* destOffset */
0, /* numPoints */ numCoords);
}
return seg;
@@ -642,7 +642,7 @@
if (transform != null)
transform.transform( /* src */
coords, /* srcOffset */
- pos, /* dest */ coords, /* destOffset */
+ 0, /* dest */ coords, /* destOffset */
0, /* numPoints */ numCoords);
}
return seg;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20041107/88688878/attachment.sig>
More information about the Java-patches
mailing list