org.apache.fop.render.ps

Class NativeTextHandler

Implemented Interfaces:
PSTextHandler

public class NativeTextHandler
extends java.lang.Object
implements PSTextHandler

Specialized TextHandler implementation that the PSGraphics2D class delegates to to paint text using PostScript text operations.

Field Summary

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 Summary

NativeTextHandler(PSGraphics2D g2d, FontInfo fontInfo)
Main constructor.

Method Summary

void
drawString(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()

Field Details

currentFontName

protected String currentFontName
the current (internal) font name

currentFontSize

protected int currentFontSize
the current font size in millipoints

font

protected Font font
Currently valid Font

fontInfo

protected FontInfo fontInfo
FontInfo containing all available fonts

overrideFont

protected Font overrideFont
Overriding FontState

Constructor Details

NativeTextHandler

public NativeTextHandler(PSGraphics2D g2d,
                         FontInfo fontInfo)
Main constructor.
Parameters:
g2d - the PSGraphics2D instance this instances is used by
fontInfo - the FontInfo object with all available fonts

Method Details

drawString

public void drawString(String s,
                       float x,
                       float y)
            throws IOException
Draw a string to the PostScript document. The text is painted using text operations.

getFontInfo

public FontInfo getFontInfo()
Return the font information associated with this object
Returns:
the FontInfo object

setOverrideFont

public void setOverrideFont(Font override)
Sets the overriding font.
Parameters:
override - Overriding Font to set

writePageSetup

public void writePageSetup()
            throws IOException

writeSetup

public void writeSetup()
            throws IOException

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.