diff options
author | Andrew Haley <aph@redhat.com> | 2008-11-05 14:19:06 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2008-11-05 14:19:06 +0000 |
commit | 57d891b40a8e827735b555d6c178ba7e1e409554 (patch) | |
tree | eb0bac86065f33d2904121ba06374dc762ee7752 /libjava/classpath/gnu | |
parent | f158188388fb801ce7c328daf1eecd693e27e5e8 (diff) | |
download | gcc-57d891b40a8e827735b555d6c178ba7e1e409554.zip gcc-57d891b40a8e827735b555d6c178ba7e1e409554.tar.gz gcc-57d891b40a8e827735b555d6c178ba7e1e409554.tar.bz2 |
FreetypeGlyphVector.java (getKerning): Return result in a float[], not a Point2D.
2008-11-05 Andrew Haley <aph@redhat.com>
* gnu/java/awt/peer/gtk/FreetypeGlyphVector.java (getKerning):
Return result in a float[], not a Point2D.
(performDefaultLayout): Call getKerning with a float[].
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_FreetypeGlyphVector.c
(getKerning): Return result in a float[], not a Point2D.
From-SVN: r141610
Diffstat (limited to 'libjava/classpath/gnu')
-rw-r--r-- | libjava/classpath/gnu/java/awt/peer/gtk/FreetypeGlyphVector.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libjava/classpath/gnu/java/awt/peer/gtk/FreetypeGlyphVector.java b/libjava/classpath/gnu/java/awt/peer/gtk/FreetypeGlyphVector.java index 8d6d01a..af975f3 100644 --- a/libjava/classpath/gnu/java/awt/peer/gtk/FreetypeGlyphVector.java +++ b/libjava/classpath/gnu/java/awt/peer/gtk/FreetypeGlyphVector.java @@ -247,7 +247,8 @@ public class FreetypeGlyphVector extends GlyphVector /** * Returns the kerning of a glyph pair */ - private native Point2D getKerning(int leftGlyph, int rightGlyph, long font); + private native void getKerning(int leftGlyph, int rightGlyph, long font, + float[] p); private native double[] getMetricsNative(int glyphCode, long font); @@ -301,6 +302,7 @@ public class FreetypeGlyphVector extends GlyphVector GlyphMetrics gm = null; float x = 0; float y = 0; + float[] p = {0.0f, 0.0f}; for(int i = 0; i < nGlyphs; i++) { gm = getGlyphMetrics( i ); @@ -314,9 +316,9 @@ public class FreetypeGlyphVector extends GlyphVector // using the same font if (i != nGlyphs-1 && fontSet[i] == fontSet[i+1]) { - Point2D p = getKerning(glyphCodes[i], glyphCodes[i + 1], fontSet[i]); - x += p.getX(); - y += p.getY(); + getKerning(glyphCodes[i], glyphCodes[i + 1], fontSet[i], p); + x += p[0]; + y += p[1]; } } glyphPositions[nGlyphs * 2] = x; |