public class Glyph extends Object
Constructor and Description |
---|
Glyph(String unicode,
List names,
String orientation,
String arabicForm,
String lang,
Point2D horizOrigin,
Point2D vertOrigin,
float horizAdvX,
float vertAdvY,
int glyphCode,
TextPaintInfo tpi,
Shape dShape,
GraphicsNode glyphChildrenNode)
Constructs a Glyph with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(Graphics2D graphics2D)
Draws this glyph.
|
String |
getArabicForm()
Returns which of the four possible arabic forms this glyph represents.
|
Rectangle2D |
getBounds2D() |
Rectangle2D |
getGeometryBounds() |
int |
getGlyphCode()
Returns the glyphs unique code with resect to its font.
|
GVTGlyphMetrics |
getGlyphMetrics()
Returns the metrics of this Glyph if it is used in a horizontal layout.
|
GVTGlyphMetrics |
getGlyphMetrics(float hkern,
float vkern)
Returns the metrics of this Glyph with the specified kerning value
applied.
|
float |
getHorizAdvX()
Returns the horizontal advance value.
|
Point2D |
getHorizOrigin()
Returns the horizontal origin of this glyph.
|
String |
getLang()
Returns a comma separated list of languages this glyph can be used in.
|
Vector |
getNames()
Returns the names of this glyph.
|
String |
getOrientation()
Returns the orientation of this glyph.
|
Shape |
getOutline()
Returns the outline of this glyph.
|
Point2D |
getPosition()
Returns the position of this glyph.
|
AffineTransform |
getTransform()
Returns the glpyh's transform.
|
String |
getUnicode()
Returns the unicode char or chars this glyph represents.
|
float |
getVertAdvY()
Returns the vertical advance value.
|
Point2D |
getVertOrigin()
Returns the vertical origin of this glyph.
|
void |
setPosition(Point2D position)
Sets the position of the glyph.
|
void |
setTransform(AffineTransform transform)
Sets the transform to be applied to this glyph.
|
public Glyph(String unicode, List names, String orientation, String arabicForm, String lang, Point2D horizOrigin, Point2D vertOrigin, float horizAdvX, float vertAdvY, int glyphCode, TextPaintInfo tpi, Shape dShape, GraphicsNode glyphChildrenNode)
public String getUnicode()
public Vector getNames()
public String getOrientation()
public String getArabicForm()
public String getLang()
public Point2D getHorizOrigin()
public Point2D getVertOrigin()
public float getHorizAdvX()
public float getVertAdvY()
public int getGlyphCode()
public AffineTransform getTransform()
public void setTransform(AffineTransform transform)
transform
- The transform to set.public Point2D getPosition()
public void setPosition(Point2D position)
position
- The new glyph position.public GVTGlyphMetrics getGlyphMetrics()
public GVTGlyphMetrics getGlyphMetrics(float hkern, float vkern)
hkern
- The horizontal kerning value to apply when calculating
the glyph metrics.vkern
- The horizontal vertical value to apply when calculating
the glyph metrics.public Rectangle2D getGeometryBounds()
public Rectangle2D getBounds2D()
public Shape getOutline()
public void draw(Graphics2D graphics2D)
graphics2D
- The Graphics2D object to draw to.Copyright © 2000–2020 Apache Software Foundation. All rights reserved.