/[classpath]/classpath/gnu/java/awt/peer/gtk/GdkFontPeer.java
ViewVC logotype

Diff of /classpath/gnu/java/awt/peer/gtk/GdkFontPeer.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by mkoch, Tue Nov 16 07:44:44 2004 UTC revision 1.4 by graydon, Sat Feb 12 09:37:31 2005 UTC
# Line 81  public class GdkFontPeer extends Classpa Line 81  public class GdkFontPeer extends Classpa
81    private native void dispose ();    private native void dispose ();
82    private native void setFont (String family, int style, int size, boolean useGraphics2D);    private native void setFont (String family, int style, int size, boolean useGraphics2D);
83    
84      native void getFontMetrics(double [] metrics);
85      native void getTextMetrics(String str, double [] metrics);
86    
87    protected void finalize ()    protected void finalize ()
88    {    {
89      if (GtkToolkit.useGraphics2D ())      if (GtkToolkit.useGraphics2D ())
# Line 158  public class GdkFontPeer extends Classpa Line 161  public class GdkFontPeer extends Classpa
161    
162    public boolean canDisplay (Font font, char c)    public boolean canDisplay (Font font, char c)
163    {    {
164      throw new UnsupportedOperationException ();      // FIXME: inquire with pango
165        return true;
166    }    }
167    
168    public int canDisplayUpTo (Font font, CharacterIterator i, int start, int limit)    public int canDisplayUpTo (Font font, CharacterIterator i, int start, int limit)
169    {    {
170      throw new UnsupportedOperationException ();      // FIXME: inquire with pango
171        return -1;
172    }    }
173      
174      private native GdkGlyphVector getGlyphVector(String txt,
175                                                   Font f,
176                                                   FontRenderContext ctx);
177    
178    public GlyphVector createGlyphVector (Font font,    public GlyphVector createGlyphVector (Font font,
179                                          FontRenderContext ctx,                                          FontRenderContext ctx,
180                                          CharacterIterator i)                                          CharacterIterator i)
181    {    {
182      return new GdkGlyphVector(font, this, ctx, buildString (i));      return getGlyphVector(buildString (i), font, ctx);
183    }    }
184    
185    public GlyphVector createGlyphVector (Font font,    public GlyphVector createGlyphVector (Font font,
186                                          FontRenderContext ctx,                                          FontRenderContext ctx,
187                                          int[] glyphCodes)                                          int[] glyphCodes)
188    {    {
189      return new GdkGlyphVector (font, this, ctx, glyphCodes);      return null;
190        //    return new GdkGlyphVector (font, this, ctx, glyphCodes);
191    }    }
192    
193    public byte getBaselineFor (Font font, char c)    public byte getBaselineFor (Font font, char c)
# Line 259  public class GdkFontPeer extends Classpa Line 269  public class GdkFontPeer extends Classpa
269    public Rectangle2D getStringBounds (Font font, CharacterIterator ci,    public Rectangle2D getStringBounds (Font font, CharacterIterator ci,
270                                        int begin, int limit, FontRenderContext frc)                                        int begin, int limit, FontRenderContext frc)
271    {    {
272      throw new UnsupportedOperationException ();      GdkGlyphVector gv = getGlyphVector(buildString (ci, begin, limit), font, frc);
273        return gv.getVisualBounds();
274    }    }
275    
276    public boolean hasUniformLineMetrics (Font font)    public boolean hasUniformLineMetrics (Font font)

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26