Browse Source

REPORT-4888 设计器交互修改

聚合报表单元报表缩放问题
master
MoMeak 7 years ago
parent
commit
e5a54886b5
  1. 10
      designer/src/com/fr/poly/creator/BlockCreator.java

10
designer/src/com/fr/poly/creator/BlockCreator.java

@ -114,10 +114,12 @@ public abstract class BlockCreator<T extends TemplateBlock> extends JComponent i
public Rectangle getEditorBounds() { public Rectangle getEditorBounds() {
Rectangle bounds = this.getBounds(); Rectangle bounds = this.getBounds();
Dimension d = getEditor().getCornerSize(); Dimension d = getEditor().getCornerSize();
bounds.x -= d.width + designer.getHorizontalValue(); //ECBlockCreator缩放的时候边框需要重新算下
bounds.y -= d.height + designer.getVerticalValue(); double times = this.designer.getResolution() / (double)resolution;
bounds.width += d.width + PolyConstants.OPERATION_SIZE; bounds.x -= d.width/times + designer.getHorizontalValue();
bounds.height += d.height + PolyConstants.OPERATION_SIZE; bounds.y -= d.height/times + designer.getVerticalValue();
bounds.width += Math.ceil(d.width/times + PolyConstants.OPERATION_SIZE/times);
bounds.height += Math.ceil(d.height/times + PolyConstants.OPERATION_SIZE/times);
return bounds; return bounds;
} }

Loading…
Cancel
Save