forked from fanruan/design
Browse Source
Merge in DESIGN/design from ~HADES/design:feature/x to feature/x * commit '47fe63a2fb56177a8b5abf2c9fc194462710ee95': REPORT-70426 条件属性支持汇总数组-交互界面问题 REPORT-70446 添加工具方法 REPORT-70446 交互视觉修改 svg图片绘制问题 REPORT-70387 次管远程连接,会看到特定的没有权限的数据连接 REPORT-70446 交互视觉修改feature/x
Hades
3 years ago
6 changed files with 61 additions and 10 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