summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:05:10 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:05:10 +0000
commit345a74e64c4ab22ef9482c0d04c13ac9e8b63e00 (patch)
treea3bb931efb3734e8fbb6388540439af079b510fc /pdf-over-gui/src/main/java
parent7ffcbe20394fd0626582acbd3a1e174b98d1ccb8 (diff)
downloadmocca-345a74e64c4ab22ef9482c0d04c13ac9e8b63e00.tar.gz
mocca-345a74e64c4ab22ef9482c0d04c13ac9e8b63e00.tar.bz2
mocca-345a74e64c4ab22ef9482c0d04c13ac9e8b63e00.zip
New initial sig pos (within page)
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@121 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java4
1 files changed, 3 insertions, 1 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 d30c6bf8..f4e4f240 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
@@ -192,7 +192,9 @@ public class SignaturePanel extends JPanel {
if (this.sigPagePos == null)
{
- this.sigScreenPos = new Point2D.Double((pageSize.getWidth() / 3) * 2, (pageSize.getHeight() / 4) * 3);
+ this.sigScreenPos = new Point2D.Double(
+ clamp((int) (pageSize.getWidth() / 2), 0, this.currentImage.getWidth(null) - this.sigScreenWidth),
+ clamp((int) ((pageSize.getHeight() / 4) * 3), 0, this.currentImage.getHeight(null) - this.sigScreenHeight));
this.sigPagePos = this.currentXform.transform(this.sigScreenPos, this.sigPagePos);
}