forked from fanruan/design
Browse Source
Merge in DESIGN/design from ~HADES/design:release/11.0 to release/11.0 * commit '5e3cf961e56c1ba3275668dff59f68942bbb38fe': REPORT-70446 添加工具方法 REPORT-70446 交互视觉修改 svg图片绘制问题 REPORT-70387 次管远程连接,会看到特定的没有权限的数据连接 REPORT-70446 交互视觉修改release/11.0
Hades
3 years ago
5 changed files with 52 additions and 5 deletions
@ -0,0 +1,28 @@ |
|||||||
|
package com.fr.design.utils; |
||||||
|
|
||||||
|
import com.fr.base.svg.SVGLoader; |
||||||
|
import com.fr.base.svg.SystemScaleUtils; |
||||||
|
import java.awt.Graphics2D; |
||||||
|
|
||||||
|
/** |
||||||
|
* 用于绘制svg图片缩放(高分屏下) |
||||||
|
* |
||||||
|
* @author hades |
||||||
|
* @version 11.0 |
||||||
|
* Created by hades on 2022/5/6 |
||||||
|
*/ |
||||||
|
public class SvgPaintUtils { |
||||||
|
|
||||||
|
public static void beforePaint(Graphics2D g2) { |
||||||
|
if (SystemScaleUtils.isJreHiDPIEnabled()) { |
||||||
|
g2.scale(1 / SVGLoader.SYSTEM_SCALE, 1 / SVGLoader.SYSTEM_SCALE); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public static void afterPaint(Graphics2D g2) { |
||||||
|
if (SystemScaleUtils.isJreHiDPIEnabled()) { |
||||||
|
g2.scale(SVGLoader.SYSTEM_SCALE, SVGLoader.SYSTEM_SCALE); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue