Browse Source

REPORT-4480 [9.0一轮回归]设计器设置标尺单位无效

master
MoMeak 7 years ago
parent
commit
e11ab31af6
  1. 2
      designer_base/src/com/fr/design/scrollruler/HorizontalRulerUI.java
  2. 2
      designer_base/src/com/fr/design/scrollruler/VerticalRulerUI.java

2
designer_base/src/com/fr/design/scrollruler/HorizontalRulerUI.java

@ -27,7 +27,7 @@ public class HorizontalRulerUI extends RulerUI {
g.setColor(BaseRuler.UNIT_SIGN_COLOR);
if (i % BaseRuler.SCALE_10 == 0) {
double times = (double)HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getJTemplateResolution() / ScreenResolution.getScreenResolution();
String text = Utils.convertNumberStringToString(Math.round(i / times));
String text = Utils.convertNumberStringToString(Math.round((i / times) / showText));
Graphics2D gg = (Graphics2D) g.create((int) (toPX(i) / ratio) - extra + 1, 0, BaseRuler.NUMBER_100, size.height);
BaseUtils.drawStringStyleInRotation(gg, BaseRuler.NUMBER_100, BaseRuler.NUMBER_14, text, Style.getInstance().deriveHorizontalAlignment(
Style.LEFT_TO_RIGHT).deriveFRFont(BaseRuler.TEXT_FONT), ScreenResolution.getScreenResolution());

2
designer_base/src/com/fr/design/scrollruler/VerticalRulerUI.java

@ -24,7 +24,7 @@ public class VerticalRulerUI extends RulerUI{
g.setColor(BaseRuler.UNIT_SIGN_COLOR);
if (i % BaseRuler.SCALE_10 == 0) {
double times = (double) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getJTemplateResolution() / ScreenResolution.getScreenResolution();
String text = Utils.convertNumberStringToString(Math.round(i / times));
String text = Utils.convertNumberStringToString(Math.round((i / times) / showText));
GraphHelper.drawLine(g, size.width, toPX(i) / ratio - extra, 0, toPX(i) / ratio - extra);
Graphics2D gg = (Graphics2D) g.create(0, (int) (toPX(i) / ratio - extra + 1), size.width, BaseRuler.NUMBER_99);
BaseUtils.drawStringStyleInRotation(gg, BaseRuler.NUMBER_11, BaseRuler.NUMBER_100, text, Style.getInstance().deriveVerticalAlignment(1).deriveRotation(

Loading…
Cancel
Save