diff options
Diffstat (limited to 'pdf-over-gui')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java | 2 |
1 files changed, 2 insertions, 0 deletions
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) { |