Hi,

I committed this GdkGraphics2D fix.  Attempts to draw zero-length
strings were causing assertion failures in cairoDrawGlyphVector.

Tom

2005-09-02  Thomas Fitzsimmons  <[EMAIL PROTECTED]>

        PR awt/23557
        * gnu/java/awt/peer/gtk/GdkGraphics2D.java (drawString(String,
        float, float)): Return immediately if string is null or
        zero-length.

Index: gnu/java/awt/peer/gtk/GdkGraphics2D.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/GdkGraphics2D.java,v
retrieving revision 1.43
diff -u -r1.43 GdkGraphics2D.java
--- gnu/java/awt/peer/gtk/GdkGraphics2D.java	2 Sep 2005 04:15:51 -0000	1.43
+++ gnu/java/awt/peer/gtk/GdkGraphics2D.java	2 Sep 2005 04:40:25 -0000
@@ -1510,6 +1510,9 @@
 
   public void drawString(String str, float x, float y)
   {
+    if (str == null || str.length() == 0)
+      return;
+
     drawGlyphVector(getFont().createGlyphVector(null, str), x, y);
     updateBufferedImage ();
   }
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to