From 8a8deae28bb4fb9eda07f50f68efa714722d2409 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Thu, 12 Oct 2017 15:56:53 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-4888=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E4=BF=AE=E6=94=B9=20=E8=81=9A=E5=90=88?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=8D=95=E5=85=83=E6=8A=A5=E8=A1=A8=E7=BC=A9?= =?UTF-8?q?=E6=94=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/poly/PolyDesignUI.java | 27 ++++++++++++---------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/designer/src/com/fr/poly/PolyDesignUI.java b/designer/src/com/fr/poly/PolyDesignUI.java index 8cc3583d85..b915e1ad8e 100644 --- a/designer/src/com/fr/poly/PolyDesignUI.java +++ b/designer/src/com/fr/poly/PolyDesignUI.java @@ -220,18 +220,21 @@ public class PolyDesignUI extends ComponentUI { ArrayList dbcomponents = new ArrayList(); // richer:禁止双缓冲行为,否则会出现两个图像 ComponentUtils.disableBuffer(comp, dbcomponents); - if (comp instanceof ECBlockCreator) { - Graphics clipg = g.create((int) (x * time), (int) (y * time), (int) (width * time), (int) (height * time)); - comp.paint(clipg); - clipg.dispose(); - }else { - BufferedImage img = CoreGraphHelper.createBufferedImage(comp.getWidth(), comp.getHeight(), BufferedImage.TYPE_INT_RGB); - Graphics2D g2d = img.createGraphics(); - g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); - comp.printAll(g2d); - g2d.dispose(); - g.drawImage(img, (int) (x * time), (int) (y * time), (int) (width * time), (int) (height * time),null); - } +// if (comp instanceof ECBlockCreator) { +// Graphics clipg = g.create((int) (x * time), (int) (y * time), (int) (width * time), (int) (height * time)); +// comp.paint(clipg); +// clipg.dispose(); +// }else { + BufferedImage img = CoreGraphHelper.createBufferedImage(comp.getWidth(), comp.getHeight(), BufferedImage.TYPE_4BYTE_ABGR); + + Graphics2D g2d = img.createGraphics(); + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + comp.printAll(g2d); + g.drawImage(img, (int) (x * time), (int) (y * time), (int) (width * time), (int) (height * time),null); + + g2d.dispose(); + +// } ComponentUtils.resetBuffer(dbcomponents); }