Browse Source

REPORT-4888 设计器交互修改

聚合报表单元报表缩放问题
master
MoMeak 7 years ago
parent
commit
8a8deae28b
  1. 19
      designer/src/com/fr/poly/PolyDesignUI.java

19
designer/src/com/fr/poly/PolyDesignUI.java

@ -220,18 +220,21 @@ public class PolyDesignUI extends ComponentUI {
ArrayList<JComponent> dbcomponents = new ArrayList<JComponent>(); ArrayList<JComponent> dbcomponents = new ArrayList<JComponent>();
// richer:禁止双缓冲行为,否则会出现两个图像 // richer:禁止双缓冲行为,否则会出现两个图像
ComponentUtils.disableBuffer(comp, dbcomponents); ComponentUtils.disableBuffer(comp, dbcomponents);
if (comp instanceof ECBlockCreator) { // if (comp instanceof ECBlockCreator) {
Graphics clipg = g.create((int) (x * time), (int) (y * time), (int) (width * time), (int) (height * time)); // Graphics clipg = g.create((int) (x * time), (int) (y * time), (int) (width * time), (int) (height * time));
comp.paint(clipg); // comp.paint(clipg);
clipg.dispose(); // clipg.dispose();
}else { // }else {
BufferedImage img = CoreGraphHelper.createBufferedImage(comp.getWidth(), comp.getHeight(), BufferedImage.TYPE_INT_RGB); BufferedImage img = CoreGraphHelper.createBufferedImage(comp.getWidth(), comp.getHeight(), BufferedImage.TYPE_4BYTE_ABGR);
Graphics2D g2d = img.createGraphics(); Graphics2D g2d = img.createGraphics();
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
comp.printAll(g2d); comp.printAll(g2d);
g2d.dispose();
g.drawImage(img, (int) (x * time), (int) (y * time), (int) (width * time), (int) (height * time),null); g.drawImage(img, (int) (x * time), (int) (y * time), (int) (width * time), (int) (height * time),null);
}
g2d.dispose();
// }
ComponentUtils.resetBuffer(dbcomponents); ComponentUtils.resetBuffer(dbcomponents);
} }

Loading…
Cancel
Save