public class NativeTextHandler extends Object implements org.apache.xmlgraphics.java2d.ps.PSTextHandler
Modifier and Type | Field and Description |
---|---|
protected String |
currentFontName
the current (internal) font name
|
protected int |
currentFontSize
the current font size in millipoints
|
protected Font |
font
Currently valid Font
|
protected FontInfo |
fontInfo
FontInfo containing all available fonts
|
protected Font |
overrideFont
Overriding FontState
|
Constructor and Description |
---|
NativeTextHandler(org.apache.xmlgraphics.java2d.ps.PSGraphics2D g2d,
FontInfo fontInfo)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
drawString(Graphics2D g,
String s,
float x,
float y)
Draw a string to the PostScript document.
|
FontInfo |
getFontInfo()
Return the font information associated with this object
|
void |
setOverrideFont(Font override)
Sets the overriding font.
|
void |
writePageSetup() |
void |
writeSetup() |
protected FontInfo fontInfo
protected Font font
protected Font overrideFont
protected String currentFontName
protected int currentFontSize
public NativeTextHandler(org.apache.xmlgraphics.java2d.ps.PSGraphics2D g2d, FontInfo fontInfo)
g2d
- the PSGraphics2D instance this instances is used byfontInfo
- the FontInfo object with all available fontspublic FontInfo getFontInfo()
public void writeSetup() throws IOException
writeSetup
in interface org.apache.xmlgraphics.java2d.ps.PSTextHandler
IOException
public void writePageSetup() throws IOException
writePageSetup
in interface org.apache.xmlgraphics.java2d.ps.PSTextHandler
IOException
public void drawString(Graphics2D g, String s, float x, float y) throws IOException
drawString
in interface org.apache.xmlgraphics.java2d.TextHandler
IOException
public void setOverrideFont(Font override)
override
- Overriding Font to setCopyright © 2025 Apache Software Foundation. All rights reserved.