From 22e9510a572605393556eb75b3037729ae2abe43 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:05:23 +0000 Subject: Use specified font, scale emblem in placeholder git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@123 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pdf-over-gui/src') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java index 7fee3021..cb23d055 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java @@ -255,6 +255,7 @@ public class SignaturePanel extends JPanel { if ((this.sigScreenWidth != this.prevSigScreenWidth) || (this.sigScreenHeight != this.prevSigScreenHeight)) { + // redraw scaled transparent placeholder this.prevSigScreenWidth = this.sigScreenWidth; this.prevSigScreenHeight = this.sigScreenHeight; Image placeholder = this.sigPlaceholder.getScaledInstance( @@ -262,6 +263,7 @@ public class SignaturePanel extends JPanel { this.sigPlaceholderScaled = new BufferedImage(this.sigScreenWidth, this.sigScreenHeight, BufferedImage.TYPE_INT_ARGB); Graphics g2 = this.sigPlaceholderScaled.getGraphics(); g2.drawImage(placeholder, 0, 0, null); + g2.dispose(); int[] phpixels = new int[this.sigScreenWidth * this.sigScreenHeight]; phpixels = this.sigPlaceholderScaled.getRGB(0, 0, this.sigScreenWidth, this.sigScreenHeight, phpixels, 0, this.sigScreenWidth); for (int i = 0; i < phpixels.length; ++i) { -- cgit v1.2.3