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 |
POSTSCRIPT_FONT_NAMES
|
protected StringBuilder |
ps
|
| Constructor and Description |
|---|
PostScriptDocument()
|
PostScriptDocument(String
|
| 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
|
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
|
void |
stroke()
|
void |
text(String
|
public static final StringDEFAULT_FONT
protected int boundingBoxWidth
protected int boundingBoxHeight
protected SystemFontMetricsfontMetrics
protected StringfontName
protected int fontSize
protected double lineWidth
protected StringboundingBox
protected StringBuilderps
protected boolean closed
public PostScriptDocument()
public PostScriptDocument(StringfontName, int fontSize)
public StringgetPS()
public void boundingBox(int w,
int h)public void close()
protected StringBuilderheader()
public void setFont(StringfontName, 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(Strings, double x, double y)
public double getWidth(char c)
public double getWidth(Strings)
public double getLineHeight()
public int getFontSize()