summaryrefslogtreecommitdiff
path: root/trunk
diff options
context:
space:
mode:
authortkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-10-31 16:36:40 +0000
committertkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-10-31 16:36:40 +0000
commit72697fcaf89382ac5fd3568ffac4ec37d4c40b7a (patch)
tree9e37544e986b2cf1b8b0f5321117a282242c9d71 /trunk
parent6d0544c85041f2bd8ea8b079b56b9be2ccafb7ca (diff)
downloadpdf-over-72697fcaf89382ac5fd3568ffac4ec37d4c40b7a.tar.gz
pdf-over-72697fcaf89382ac5fd3568ffac4ec37d4c40b7a.tar.bz2
pdf-over-72697fcaf89382ac5fd3568ffac4ec37d4c40b7a.zip
New initial sig pos (within page)
git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12707 3a0b52a2-8410-0410-bc02-ff6273a87459
Diffstat (limited to 'trunk')
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java
index d30c6bf8..f4e4f240 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java
+++ b/trunk/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);
}