* commit '9f8a979e815b172f852659ab95b5300593dac41d': (70 commits) REPORT-93211 设计器新增报错File not exists:/com/fr/design/standard/nextpage REPORT-92953 设计器修改默认工程名称后无法启动 改一下老代码魔法值 REPORT-92953 设计器修改默认工程名称后无法启动 REPORT-92953 设计器修改默认工程名称后无法启动 REPORT-92953 设计器修改默认工程名称后无法启动 REPORT-92953 设计器修改默认工程名称后无法启动 REPORT-92953 设计器修改默认工程名称后无法启动 REPORT-92893 锁定的模板,重复另存副本,设计器页面模板内容不更新--注释 REPORT-92893 锁定的模板,重复另存副本,设计器页面模板内容不更新 REPORT-82787 图表空数据提示配置页面,默认图片需补充繁中版 REPORT-82787 图表空数据提示配置页面,默认图片需补充繁中版 REPORT-82787 图表空数据提示配置页面,默认图片需补充繁中版 REPORT-82787 图表空数据提示配置页面,默认图片需补充繁中版 REPORT-82787 图表空数据提示配置页面,默认图片需补充繁中版 REPORT-92492 超管强制解锁,普通用户触发保存,弹窗提示和实际效果不符--改下注释 REPORT-92492 超管强制解锁,普通用户触发保存,弹窗提示和实际效果不符 REPORT-83689 单元格为存储过程数据列的时候无法设置数据集排列 【问题原因】设置数据集排列,获取当前模版所有数据集时,未考虑存储过程数据集,导致获取的tableDataWrapper为空 【改动思路】获取所有数据集时,包括存储过程。 REPORT-92430 设计器-图标-mac下文件图标都丢失了,windows下正常 REPORT-82787 图表空数据提示配置页面,默认图片需补充繁中版 REPORT-82787 图表空数据提示配置页面,默认图片需补充繁中版 ...fix-lag
@ -0,0 +1,16 @@
|
||||
package com.fr.design.utils; |
||||
|
||||
/** |
||||
* 绘制SVG图标的函数式接口 |
||||
* |
||||
* @author obo |
||||
* @since 11.0 |
||||
* Created on 2023/3/24 |
||||
*/ |
||||
public interface SvgDraw<T> { |
||||
|
||||
/** |
||||
* 绘制svg图标的具体逻辑,方法体 |
||||
* */ |
||||
void drawSVG(); |
||||
} |
@ -0,0 +1,73 @@
|
||||
package com.fr.design.utils; |
||||
|
||||
import com.fr.base.svg.SVGLoader; |
||||
import com.fr.base.svg.SystemScaleUtils; |
||||
import org.jetbrains.annotations.NotNull; |
||||
|
||||
import java.awt.Graphics; |
||||
import java.awt.Graphics2D; |
||||
import java.awt.Image; |
||||
import java.awt.image.ImageObserver; |
||||
|
||||
/** |
||||
* 用于绘制svg图片缩放(高分屏下) |
||||
* |
||||
* @author hades |
||||
* @since 11.0 |
||||
* Created on 2022/5/6 |
||||
*/ |
||||
public class SvgDrawUtils { |
||||
|
||||
private static final boolean HI_DPI_ENABLED = SystemScaleUtils.isJreHiDPIEnabled(); |
||||
|
||||
/** |
||||
* 绘制svg前若环境支持高清化则对缩放比例进行适配 |
||||
* */ |
||||
public static void beforeDraw(Graphics2D g2) { |
||||
if (HI_DPI_ENABLED) { |
||||
g2.scale(1 / SVGLoader.SYSTEM_SCALE, 1 / SVGLoader.SYSTEM_SCALE); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 绘制svg后还原缩放矩阵 |
||||
* */ |
||||
public static void afterDraw(Graphics2D g2) { |
||||
if (HI_DPI_ENABLED) { |
||||
g2.scale(SVGLoader.SYSTEM_SCALE, SVGLoader.SYSTEM_SCALE); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 计算高缩放下绘制svg图标时新的的位置x,y |
||||
* @param position 旧坐标的值 |
||||
* @return 新的position值 |
||||
* */ |
||||
public static int calculatePosition(int position) { |
||||
return HI_DPI_ENABLED ? (int) (position * SVGLoader.SYSTEM_SCALE) : position; |
||||
} |
||||
|
||||
/** |
||||
* 绘制svg图像的完整逻辑 |
||||
* @param graphics 绘图 |
||||
* @param svgDraw 具体绘制逻辑 |
||||
* */ |
||||
public static void doDrawSVG(@NotNull Graphics graphics, @NotNull final SvgDraw<Graphics> svgDraw) { |
||||
SvgDrawUtils.beforeDraw((Graphics2D) graphics); |
||||
svgDraw.drawSVG(); |
||||
SvgDrawUtils.afterDraw((Graphics2D) graphics); |
||||
} |
||||
|
||||
/** |
||||
* 绘制前对坐标x和y进行处理 |
||||
* @param graphics 绘图 |
||||
* @param image svg的Image对象 |
||||
* @param x x坐标 |
||||
* @param y y坐标 |
||||
* @param imageObserver 图像观察器 |
||||
* */ |
||||
public static void drawImage(Graphics graphics, Image image, int x, int y, ImageObserver imageObserver) { |
||||
//如果环境支持高清化,在调整缩放比例时绘制svg会影响到位置的变化,若图标无确定裁剪位置,则需要进行调整
|
||||
graphics.drawImage(image, SvgDrawUtils.calculatePosition(x), SvgDrawUtils.calculatePosition(y), imageObserver); |
||||
} |
||||
} |
@ -1,28 +0,0 @@
|
||||
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); |
||||
} |
||||
} |
||||
|
||||
} |
Before Width: | Height: | Size: 106 B |
Before Width: | Height: | Size: 218 B |
Before Width: | Height: | Size: 241 B |
Before Width: | Height: | Size: 190 B |
Before Width: | Height: | Size: 242 B |
Before Width: | Height: | Size: 609 B |
Before Width: | Height: | Size: 564 B |
Before Width: | Height: | Size: 497 B |
After Width: | Height: | Size: 641 B |
After Width: | Height: | Size: 366 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 491 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 646 B |
After Width: | Height: | Size: 593 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 761 B |
After Width: | Height: | Size: 443 B |
After Width: | Height: | Size: 443 B |
After Width: | Height: | Size: 447 B |
After Width: | Height: | Size: 443 B |
After Width: | Height: | Size: 850 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1014 B |
After Width: | Height: | Size: 499 B |
After Width: | Height: | Size: 481 B |
After Width: | Height: | Size: 574 B |
After Width: | Height: | Size: 574 B |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 612 B |