Package com.sun.pdfview.font
Class PDFGlyph
- java.lang.Object
-
- com.sun.pdfview.font.PDFGlyph
-
public class PDFGlyph extends java.lang.ObjectA single glyph in a stream of PDF text, which knows how to write itself onto a PDF command stream
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.geom.Point2Dadvancethe advance from this glyphprivate java.lang.Stringnamethe name of this glyphprivate PDFPagepagethe PDFPage storing this glyph's commands (for type 3 fonts)private java.awt.geom.GeneralPathshapethe shape represented by this glyph (for all fonts but type 3)private charsrcthe character code of this glyph
-
Constructor Summary
Constructors Constructor Description PDFGlyph(char src, java.lang.String name, PDFPage page, java.awt.geom.Point2D advance)Creates a new instance of PDFGlyph based on a pagePDFGlyph(char src, java.lang.String name, java.awt.geom.GeneralPath shape, java.awt.geom.Point2D.Float advance)Creates a new instance of PDFGlyph based on a shape
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.geom.Point2DaddCommands(PDFPage cmds, java.awt.geom.AffineTransform transform, int mode)Add commands for this glyph to a pagechargetChar()Get the character code of this glyphjava.lang.StringgetName()Get the name of this glyphPDFPagegetPage()Get the PDFPage for a type3 font glyphjava.awt.geom.GeneralPathgetShape()Get the shape of this glyphjava.lang.StringtoString()
-
-
-
Field Detail
-
src
private char src
the character code of this glyph
-
name
private java.lang.String name
the name of this glyph
-
advance
private java.awt.geom.Point2D advance
the advance from this glyph
-
shape
private java.awt.geom.GeneralPath shape
the shape represented by this glyph (for all fonts but type 3)
-
page
private PDFPage page
the PDFPage storing this glyph's commands (for type 3 fonts)
-
-
Constructor Detail
-
PDFGlyph
public PDFGlyph(char src, java.lang.String name, java.awt.geom.GeneralPath shape, java.awt.geom.Point2D.Float advance)Creates a new instance of PDFGlyph based on a shape
-
PDFGlyph
public PDFGlyph(char src, java.lang.String name, PDFPage page, java.awt.geom.Point2D advance)Creates a new instance of PDFGlyph based on a page
-
-
Method Detail
-
getChar
public char getChar()
Get the character code of this glyph
-
getName
public java.lang.String getName()
Get the name of this glyph
-
getShape
public java.awt.geom.GeneralPath getShape()
Get the shape of this glyph
-
getPage
public PDFPage getPage()
Get the PDFPage for a type3 font glyph
-
addCommands
public java.awt.geom.Point2D addCommands(PDFPage cmds, java.awt.geom.AffineTransform transform, int mode)
Add commands for this glyph to a page
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-