public interface GraphicsProvider
The methods in this interface take as parameters the coordinates of the upper left corner of the object to be drawn, the object itself (text or image), and the page number where the object is to be drawn. For text, there are methods for drawing a single line of text and for drawing multiple lines of text.
The rotation method allows to rotate the coordinate system by a specified angle around a specified point.
The origin of the coordinate system is the upper left corner.
| 限定符和类型 | 方法和说明 |
|---|---|
void |
drawImage(float x,
float y,
byte[] data,
int pageNumber)
Draw image.
|
void |
drawMultiLineString(float x,
float y,
List<String> text,
int pageNumber)
Draw multi-line text.
|
void |
drawString(float x,
float y,
String text,
int pageNumber)
Draw text.
|
void |
rotate(float angle,
float x,
float y,
int pageNumber)
Rotate the coordinate system.
|
void drawString(float x,
float y,
String text,
int pageNumber)
The upper left corner is the origin.
x, y is text upper left corner coordinate.
x - x coordinatey - y coordinatetext - textpageNumber - page numbervoid drawMultiLineString(float x,
float y,
List<String> text,
int pageNumber)
The upper left corner is the origin. Default style: text-align:left;
x, y is text upper left corner coordinate.
x - x coordinatey - y coordinatetext - textpageNumber - page numbervoid drawImage(float x,
float y,
byte[] data,
int pageNumber)
The upper left corner is the origin.
x, y is text upper left corner coordinate.
x - x coordinatey - y coordinatedata - image datapageNumber - page numbervoid rotate(float angle,
float x,
float y,
int pageNumber)
angle - The angle of clockwise rotationx - rotate xy - rotate ypageNumber - page numberCopyright © 2024. All rights reserved.