[cp-patches] RFA: CairoGraphics2D.java fixlet

Mark Wielaard mark at klomp.org
Thu Jun 15 18:08:41 UTC 2006


Hi,

On Thu, 2006-06-15 at 02:19 +0200, Sven de Marothy wrote:
> On Wed, 14 Jun 2006, David Gilbert wrote:
> > As I understand the getPathIterator(AffineTransform) method defined in the
> > Shape interface, if you want the path returned without transformation, you can
> > pass in null for the AffineTransform.  So it is wasteful to create a new
> > identity transform as we seem to be doing here.
> 
> Seems sane to me.

Found another one while debugging some other code in BasicStroke:

2006-06-15  Mark Wielaard  <mark at klomp.org>

    * java/awt/BasicStroke.java (createStrokedShape): Call
    getPathIterator with null argument.

Committed,

Mark

diff -u -r1.12 BasicStroke.java
--- java/awt/BasicStroke.java   10 May 2006 14:42:26 -0000      1.12
+++ java/awt/BasicStroke.java   15 Jun 2006 18:06:13 -0000
@@ -260,7 +260,7 @@
    */
   public Shape createStrokedShape(Shape s)
   {
-    PathIterator pi = s.getPathIterator( new AffineTransform() );
+    PathIterator pi = s.getPathIterator(null);

     if( dash == null )
       return solidStroke( pi );

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060615/67ce5d6d/attachment.pgp


More information about the Classpath-patches mailing list