public class PostScriptDocument extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
boundingBox |
protected int |
boundingBoxHeight |
protected int |
boundingBoxWidth |
protected boolean |
closed |
static String |
DEFAULT_FONT |
protected SystemFontMetrics |
fontMetrics |
protected String |
fontName |
protected int |
fontSize |
protected double |
lineWidth |
static Map<String,String> |
POSTSCRIPT_FONT_NAMES |
protected StringBuilder |
ps |
Constructor and Description |
---|
PostScriptDocument() |
PostScriptDocument(String fontName,
int fontSize) |
Modifier and Type | Method and Description |
---|---|
void |
boundingBox(int w,
int h) |
void |
close() |
int |
getFontSize() |
double |
getLineHeight() |
String |
getPS() |
double |
getWidth(char c)
All chars are 600 thousands of an 'em' wide if courier
|
double |
getWidth(String s) |
protected StringBuilder |
header()
Compute the header separately because we need to wait for the bounding box
|
void |
highlight(double x,
double y,
double width,
double height)
Make red box
|
void |
line(double x1,
double y1,
double x2,
double y2) |
void |
lineto(double x,
double y) |
void |
lineWidth(double w) |
void |
move(double x,
double y) |
void |
rect(double x,
double y,
double width,
double height) |
void |
setFont(String fontName,
int fontSize) |
void |
stroke() |
void |
text(String s,
double x,
double y) |
public static final String DEFAULT_FONT
protected int boundingBoxWidth
protected int boundingBoxHeight
protected SystemFontMetrics fontMetrics
protected String fontName
protected int fontSize
protected double lineWidth
protected String boundingBox
protected StringBuilder ps
protected boolean closed
public PostScriptDocument()
public PostScriptDocument(String fontName, int fontSize)
public String getPS()
public void boundingBox(int w, int h)
public void close()
protected StringBuilder header()
public void setFont(String fontName, int fontSize)
public void lineWidth(double w)
public void move(double x, double y)
public void lineto(double x, double y)
public void line(double x1, double y1, double x2, double y2)
public void rect(double x, double y, double width, double height)
public void highlight(double x, double y, double width, double height)
public void stroke()
public void text(String s, double x, double y)
public double getWidth(char c)
public double getWidth(String s)
public double getLineHeight()
public int getFontSize()
Copyright © 1992-2013 ANTLR. All Rights Reserved.