Re: Problem with Font.createGlyphVector(frc, String)
- From: "Orna Vel via JavaKB.com" <forum@xxxxxxxxxx>
- Date: Thu, 28 Apr 2005 22:24:10 GMT
It means that nobody had this problem before?
It appears just sometime. As I found, if you call
code:
----------------------------------------------------------------------------
----
Graphics2D g2D;FontRenderContext frc = g2D.getFontRenderContext();String
string = new String (" test ");GlyphVector gV = Font.createGlyphVector
(frc, string); g2D.drawGlyphVector ( gV ,0 ,0 );
----------------------------------------------------------------------------
----
everything works fine, but
if you want to draw SHAPE here is the problem:
code:
----------------------------------------------------------------------------
----
Shape dispElement;Graphics2D g2D;FontRenderContext frc =
g2D.getFontRenderContext();String string = new String (" test ")
;GlyphVector gV = Font.createGlyphVector(frc, string); dispElement =
gV.getOutline();g2D.fill(dispElement);
----------------------------------------------------------------------------
----
the leading blanks are disappear. Too bad.
--
Message posted via http://www.javakb.com
.
- References:
- Problem with Font.createGlyphVector(frc, String)
- From: Orna Vel via JavaKB.com
- Problem with Font.createGlyphVector(frc, String)
- Prev by Date: Re: Horizontal wrap with JScrollPane
- Next by Date: Re: Replace row in JTable
- Previous by thread: Problem with Font.createGlyphVector(frc, String)
- Next by thread: Browser Drag and Drop
- Index(es):
Relevant Pages
|
|