|
|
|
@ -4,13 +4,14 @@ import com.fr.base.svg.SVGLoader;
|
|
|
|
|
import com.fr.base.svg.SystemScaleUtils; |
|
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
|
import com.fr.design.mainframe.alphafine.AlphaFineUtil; |
|
|
|
|
import com.fr.design.utils.SvgPaintUtils; |
|
|
|
|
import com.fr.design.utils.SvgDrawUtils; |
|
|
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import java.awt.Color; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.Graphics; |
|
|
|
|
import java.awt.Graphics2D; |
|
|
|
|
import java.awt.Image; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @author hades |
|
|
|
@ -33,7 +34,7 @@ public class QuestionPane extends JPanel {
|
|
|
|
|
protected void paintComponent(Graphics g) { |
|
|
|
|
super.paintComponent(g); |
|
|
|
|
Graphics2D g2 = (Graphics2D) g; |
|
|
|
|
SvgPaintUtils.beforePaint(g2); |
|
|
|
|
SvgDrawUtils.beforeDraw(g2); |
|
|
|
|
// 宽高保持
|
|
|
|
|
int width = SystemScaleUtils.isJreHiDPIEnabled() ? (int) (getWidth() * SVGLoader.SYSTEM_SCALE) : getWidth(); |
|
|
|
|
int height = SystemScaleUtils.isJreHiDPIEnabled() ? (int) (getHeight() * SVGLoader.SYSTEM_SCALE) : getHeight(); |
|
|
|
@ -47,7 +48,7 @@ public class QuestionPane extends JPanel {
|
|
|
|
|
int imageWidth = QUESTION_IMAGE.getWidth(this); |
|
|
|
|
int imageHeight = QUESTION_IMAGE.getHeight(this); |
|
|
|
|
g2.drawImage(QUESTION_IMAGE, (width - imageWidth) / 2 - 2, (height - imageHeight) / 2 - 2,this); |
|
|
|
|
SvgPaintUtils.afterPaint(g2); |
|
|
|
|
SvgDrawUtils.afterDraw(g2); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|