|
@@ -37,10 +37,10 @@ public class ImageTrajectoryUtil {
|
|
FileOutputStream output = null;
|
|
FileOutputStream output = null;
|
|
try {
|
|
try {
|
|
BufferedImage image = ImageIO.read(new FileInputStream(imgFile));
|
|
BufferedImage image = ImageIO.read(new FileInputStream(imgFile));
|
|
- Graphics g = image.createGraphics();// 得到图形上下文
|
|
|
|
|
|
+ Graphics2D g = image.createGraphics();// 得到图形上下文
|
|
g.setColor(Color.red); // 设置画笔颜色
|
|
g.setColor(Color.red); // 设置画笔颜色
|
|
// 设置字体
|
|
// 设置字体
|
|
- g.setFont(new Font("宋体", Font.LAYOUT_LEFT_TO_RIGHT, 20));// 写入签名
|
|
|
|
|
|
+ g.setFont(new Font("微软雅黑", Font.LAYOUT_LEFT_TO_RIGHT, 20));// 写入签名
|
|
// 下面这一句中的43,image.getHeight()-10可以改成你要的坐标。
|
|
// 下面这一句中的43,image.getHeight()-10可以改成你要的坐标。
|
|
for (int i = 0; i < jsonArray.size(); i++) {
|
|
for (int i = 0; i < jsonArray.size(); i++) {
|
|
JSONObject jsonObject = jsonArray.getJSONObject(i);
|
|
JSONObject jsonObject = jsonArray.getJSONObject(i);
|