From 3907fb7ebcdef20fe9f322752fb13f7f6d84a919 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:36:53 +0000 Subject: Signature position can't go below zero git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@415 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit') 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 df375367..4356ca96 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 @@ -198,7 +198,7 @@ public class SignaturePanel extends JPanel { * @return signature x coordinate */ public float getSignaturePositionX() { - return (float) this.sigPagePos.getX(); + return Math.max((float) this.sigPagePos.getX(), 0); } /** @@ -206,7 +206,7 @@ public class SignaturePanel extends JPanel { * @return signature y coordinate */ public float getSignaturePositionY() { - return (float) this.sigPagePos.getY(); + return Math.max((float) this.sigPagePos.getY(), 0); } /** -- cgit v1.2.3