[cp-patches] FYI: Avoid accessor method in GdkFontLineMetrics

Mark Wielaard mark at klomp.org
Sat Jun 10 12:23:57 UTC 2006


Hi,

This avoids an accessor method (and works around a bug in gcj which
doesn't generate correct accessor methods.

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

        * gnu/java/awt/peer/gtk/GdkFontPeer.java (GdkFontLineMetrics):
        Call getSize() to avoid accessor method.

Committed,

Mark

diff -u -r1.16 GdkFontPeer.java
--- gnu/java/awt/peer/gtk/GdkFontPeer.java      9 Jun 2006 20:23:55 -0000      1.16
+++ gnu/java/awt/peer/gtk/GdkFontPeer.java      10 Jun 2006 12:16:57 -0000
@@ -268,8 +268,9 @@
       fm = m;
       nchars = n;
       strikethroughOffset = 0f;
-      strikethroughThickness = underlineThickness = ((float)fp.size) / 12f;
       underlineOffset = 0f;
+      strikethroughThickness = ((float)fp.getSize(null)) / 12f;
+      underlineThickness = strikethroughThickness;
     }

     public float getAscent()

-------------- 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/20060610/0e5d4e37/attachment.pgp


More information about the Classpath-patches mailing list