证书修改
This commit is contained in:
@@ -149,6 +149,7 @@ public class UserCertificateServiceImpl extends ServiceImpl<UserCertificateDao,
|
||||
|
||||
String[] str = {"自","年","月","日至","年","月","日在太湖学堂","学习,修完","课程,共计","学时,确认合格。"};
|
||||
g.setColor(Color.BLACK);
|
||||
g.setFont(new Font("宋体", Font.PLAIN, 32));
|
||||
FontMetrics dess = g.getFontMetrics();
|
||||
int alreadyWriteLine = 0; //已经写了多少行
|
||||
int desTotalWidth = 50; //目前一行的长度
|
||||
@@ -161,7 +162,7 @@ public class UserCertificateServiceImpl extends ServiceImpl<UserCertificateDao,
|
||||
desTotalWidth = oneWordWidth;
|
||||
}
|
||||
g.setFont(new Font("宋体", Font.PLAIN, 30));
|
||||
g.drawString(str[j].charAt(k)+"",180+desTotalWidth-oneWordWidth,820+alreadyWriteLine*(dess.getHeight()+10));
|
||||
g.drawString(str[j].charAt(k)+"",180+desTotalWidth-oneWordWidth,840+alreadyWriteLine*(dess.getHeight()+10));
|
||||
}
|
||||
if (j<des.length){
|
||||
for (int k=0;k<des[j].length(); k++){
|
||||
@@ -172,7 +173,7 @@ public class UserCertificateServiceImpl extends ServiceImpl<UserCertificateDao,
|
||||
desTotalWidth = oneWordWidth;
|
||||
}
|
||||
g.setFont(new Font("黑体", Font.BOLD, 30));
|
||||
g.drawString(des[j].charAt(k)+"",180+desTotalWidth-oneWordWidth,820+alreadyWriteLine*(dess.getHeight()+10));
|
||||
g.drawString(des[j].charAt(k)+"",180+desTotalWidth-oneWordWidth,840+alreadyWriteLine*(dess.getHeight()+10));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user