商品加入购买状态 商品详情加入水印
This commit is contained in:
@@ -83,7 +83,7 @@ public class ImageWatermarkUtil {
|
||||
g2d.drawImage(original, 0, 0, width, height, null);
|
||||
|
||||
int baseFontSize = Math.max(12, (int) (Math.min(width, height) * watermarkProperties.getFontSizeRatio()));
|
||||
Font font = new Font("Arial", Font.BOLD, baseFontSize);
|
||||
Font font = new Font("Arial", Font.PLAIN, baseFontSize);
|
||||
g2d.setFont(font);
|
||||
|
||||
int[] rgba = watermarkProperties.getColorComponents();
|
||||
@@ -92,8 +92,8 @@ public class ImageWatermarkUtil {
|
||||
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
|
||||
|
||||
double radians = Math.toRadians(watermarkProperties.getRotationDegrees());
|
||||
int stepX = (int) (baseFontSize * watermarkProperties.getSpacingRatio());
|
||||
int stepY = (int) (baseFontSize * watermarkProperties.getSpacingRatio());
|
||||
int stepX = (int) (baseFontSize * watermarkProperties.getSpacingRatioX());
|
||||
int stepY = (int) (baseFontSize * watermarkProperties.getSpacingRatioY());
|
||||
|
||||
AffineTransform rotateTransform = new AffineTransform();
|
||||
rotateTransform.translate(width / 2.0, height / 2.0);
|
||||
|
||||
Reference in New Issue
Block a user