public class EasyCanvas extends Object
| 构造器和说明 |
|---|
EasyCanvas(BufferedImage backgroundImg)
Canvas构造方法
|
EasyCanvas(int canvasWidth,
int canvasHeight)
Canvas构造方法
|
| 限定符和类型 | 方法和说明 |
|---|---|
CircleElement |
addCircleElement(int radius)
添加圆形
|
void |
addElement(IElement element)
添加元素
|
ImageElement |
addImageElement(BufferedImage input)
添加图片
|
LineElement |
addLineElement(CoordinatePoint start,
CoordinatePoint end) |
CircleElement |
addOvalElement(int width,
int height)
添加椭圆
|
RectangleElement |
addRectangleElement(int width,
int height)
添加矩形
|
TextElement |
addTextElement(String text)
添加文本
|
byte[] |
asBytes(String format) |
void |
asFile(String format,
String filePath) |
public EasyCanvas(int canvasWidth,
int canvasHeight)
canvasWidth - 画布宽canvasHeight - 画布高public EasyCanvas(BufferedImage backgroundImg)
backgroundImg - 背景图public void addElement(IElement element)
public TextElement addTextElement(String text)
text - 文本public ImageElement addImageElement(BufferedImage input)
input - 输入的图片public RectangleElement addRectangleElement(int width, int height)
width - 宽度height - 高度public CircleElement addCircleElement(int radius)
radius - 半径public CircleElement addOvalElement(int width, int height)
width - 宽度height - 高度public LineElement addLineElement(CoordinatePoint start, CoordinatePoint end)
public byte[] asBytes(String format)
Copyright © 2025. All rights reserved.