|
@@ -48,14 +48,15 @@ public class CreatePOPService {
|
|
|
g.drawImage(ImageIO.read(qrCodeImg), 100, iconHeight-300, 200, 200, null);
|
|
|
|
|
|
Graphics2D g2 = (Graphics2D) g;
|
|
|
+ Graphics2D g3 = (Graphics2D) g;
|
|
|
int scorex = 0;
|
|
|
int fenx = 0;
|
|
|
if(score == 100) {
|
|
|
- scorex = 730;
|
|
|
- fenx = 920;
|
|
|
- } else {
|
|
|
- scorex = 780;
|
|
|
+ scorex = 700;
|
|
|
fenx = 890;
|
|
|
+ } else {
|
|
|
+ scorex = 750;
|
|
|
+ fenx = 860;
|
|
|
}
|
|
|
Font rewardFirstFont = new Font("DejaVuLGCSansMono", Font.BOLD, 130);
|
|
|
AffineTransform affineTransform = new AffineTransform();
|
|
@@ -65,18 +66,19 @@ public class CreatePOPService {
|
|
|
g2.setFont(rotatedFont);
|
|
|
g2.drawString(String.valueOf(score),scorex,50);
|
|
|
|
|
|
- Font rewardLastFont = new Font("DejaVuLGCSansMono", Font.CENTER_BASELINE, 70);
|
|
|
+ Font rewardLastFont = new Font("DejaVuLGCSansMono", Font.CENTER_BASELINE, 80);
|
|
|
AffineTransform affineTransform2 = new AffineTransform();
|
|
|
affineTransform2.rotate(Math.toRadians(15), 0, 0);
|
|
|
Font rotatedFont2 = rewardLastFont.deriveFont(affineTransform);
|
|
|
- g2.setFont(rotatedFont2);
|
|
|
- g2.setColor(Color.decode("#F50000"));
|
|
|
- g2.drawString("分",fenx,280);
|
|
|
+ g3.setFont(rotatedFont2);
|
|
|
+ g3.setColor(Color.decode("#F50000"));
|
|
|
+ g3.drawString("分",fenx,280);
|
|
|
|
|
|
|
|
|
|
|
|
g.dispose();
|
|
|
g2.dispose();
|
|
|
+ g3.dispose();
|
|
|
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
|
|
ImageIO.write(bufferedImage, "jpg", os);
|
|
|
//保存为图片文件
|