I'm requesting approval for this patch, just in case I'm missing something 
important.

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.

2006-06-14  David Gilbert  <[EMAIL PROTECTED]>

        * gnu/java/awt/peer/gtk/CairoGraphics2D.java
        (draw(Shape)): Pass null transform to getPathIterator(),
        (getClip): Likewise.

Regards,

Dave
Index: gnu/java/awt/peer/gtk/CairoGraphics2D.java
===================================================================
RCS file: 
/sources/classpath/classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java,v
retrieving revision 1.23
diff -u -r1.23 CairoGraphics2D.java
--- gnu/java/awt/peer/gtk/CairoGraphics2D.java  14 Jun 2006 13:51:04 -0000      
1.23
+++ gnu/java/awt/peer/gtk/CairoGraphics2D.java  14 Jun 2006 21:58:39 -0000
@@ -776,7 +776,7 @@
     else
       {
         GeneralPath p = new GeneralPath();
-        PathIterator pi = clip.getPathIterator(new AffineTransform());
+        PathIterator pi = clip.getPathIterator(null);
         p.append(pi, false);
         return p;
       }
@@ -904,8 +904,7 @@
         // See CubicSegment.getDisplacedSegments().
         if (stroke instanceof BasicStroke)
           {
-            PathIterator flatten = s.getPathIterator(new AffineTransform(),
-                                                       1.0);
+            PathIterator flatten = s.getPathIterator(null, 1.0);
             GeneralPath p = new GeneralPath();
             p.append(flatten, false);
             s = p;

Reply via email to