| Modifier and Type | Field and Description |
|---|---|
protected static double |
MM_TO_PT |
| Constructor and Description |
|---|
AbstractCanvas() |
| Modifier and Type | Method and Description |
|---|---|
int |
putMultilineText(java.lang.String text,
double x,
double y,
int fontSize,
double maxWidth,
double leading)
Adds several lines of text to the graphics.
|
void |
putTextLines(java.lang.String[] lines,
double x,
double y,
int fontSize,
double leading)
Adds several lines of text to the graphics.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddRectangle, fillPath, getResult, lineTo, moveTo, putText, setTransformation, setupPage, startPath, strokePathprotected static final double MM_TO_PT
public int putMultilineText(java.lang.String text,
double x,
double y,
int fontSize,
double maxWidth,
double leading)
throws java.io.IOException
CanvasThe specified text is automatically broken into several lines if a text line would exceed the specified maximum length of a text line. Newlines can be used to force a line break.
The text position refers to the left most point on the baseline of the first text line. Additional lines then follow below.
putMultilineText in interface Canvastext - the textx - x position of the text's start (in mm)y - y position of the text's top (in mm)fontSize - the font size (in pt)maxWidth - maximum length of text line / width of text block (in mm)leading - additional vertical space between text lines (in mm)java.io.IOException - thrown if the graphics cannot be generatedpublic void putTextLines(java.lang.String[] lines,
double x,
double y,
int fontSize,
double leading)
throws java.io.IOException
CanvasThe text position refers to the left most point on the baseline of the first text line. Additional lines then follow below.
putTextLines in interface Canvaslines - the text linesx - x position of the text's start (in mm)y - y position of the text's top (in mm)fontSize - the font size (in pt)leading - additional vertical space between text lines (in mm)java.io.IOException - thrown if the graphics cannot be generated