Methods Summary |
---|
public boolean | equals(java.lang.Object obj)Returns true if this Glyph and specified object are equal.
if (obj == this) {
return true;
}
if (obj != null) {
try {
Glyph gl = (Glyph)obj;
return ((this.getChar() == gl.getChar())
&& (this.getGlyphMetrics().equals(gl.getGlyphMetrics()))
&& (this.getGlyphCode() == gl.getGlyphCode()));
} catch (ClassCastException e) {
}
}
return false;
|
public int[] | getABC()Returns an int array of 3 elements, so-called ABC structure that contains
the width of the character:
1st element = left side bearing of the glyph
2nd element = width of the glyph
3d element = right side bearing of the glyph
int[] abc = new int[3];
abc[0] = (int)glMetrics.getLSB();
abc[1] = (int)glMetrics.getBounds2D().getWidth();
abc[2] = (int)glMetrics.getRSB();
return abc;
|
public abstract byte[] | getBitmap()Returns array of bytes, representing image of this glyph
|
public char | getChar()Retruns char value of this glyph object
return glChar;
|
public int | getGlyphCode()Retruns glyph code of this glyph object
return glCode;
|
public java.awt.font.GlyphJustificationInfo | getGlyphJustificationInfo()Retruns GlyphJustificationInfo of this glyph object
return glJustInfo;
|
public java.awt.font.GlyphMetrics | getGlyphMetrics()Retruns GlyphMetrics of this glyph object with precise metrics.
return glMetrics;
|
public java.awt.font.GlyphMetrics | getGlyphPointMetrics()Retruns GlyphMetrics of this glyph object in pixels.
return glPointMetrics;
|
public int | getHeight()Retruns precise height of this glyph object
return Math.round((float)glMetrics.getBounds2D().getHeight());
|
public java.awt.image.BufferedImage | getImage()Sets BufferedImage representation of this glyph.
//!! Implementation classes must override this method
return null;
|
public long | getPFont()Retruns handle to Native Font object
return this.pFont;
|
public int | getPointHeight()Returns height of the glyph in points.
return (int)glPointMetrics.getBounds2D().getHeight();
|
public int | getPointWidth()Returns width of the glyph in points.
return (int)glPointMetrics.getBounds2D().getWidth();
|
public java.awt.Shape | getShape()
if (glOutline == null){
glOutline = initOutline(this.glChar);
}
return glOutline;
|
public int | getWidth()Retruns precise width of this glyph object
return Math.round((float)glMetrics.getBounds2D().getWidth());
|
public abstract java.awt.Shape | initOutline(char c)Returns shape that represents outline of the specified character.
|
public void | setGlyphJustificationInfo(java.awt.font.GlyphJustificationInfo newJustInfo)Sets JustificationInfo of this glyph object
this.glJustInfo = newJustInfo;
|
public void | setImage(java.awt.image.BufferedImage newImage)Sets BufferedImage representation of this glyph to the specified parameter.
this.image = newImage;
|