summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYegor Kozlov <yegor@apache.org>2007-03-30 13:48:56 +0000
committerYegor Kozlov <yegor@apache.org>2007-03-30 13:48:56 +0000
commit2380196562fb09f0769dabcc0412c1d9a3cc655b (patch)
treed551e04f7f98a3251f8e11055e93cfa5641e6b98
parentee8125f348fca043a66d2994949d25bf864bc786 (diff)
downloadpoi-2380196562fb09f0769dabcc0412c1d9a3cc655b.tar.gz
poi-2380196562fb09f0769dabcc0412c1d9a3cc655b.zip
convert from pixels (96dpi) to points(72dpi) when setting picture anchor
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@524085 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/model/Picture.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scratchpad/src/org/apache/poi/hslf/model/Picture.java b/src/scratchpad/src/org/apache/poi/hslf/model/Picture.java
index 9141806b81..66038ec1e4 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/model/Picture.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/model/Picture.java
@@ -147,7 +147,7 @@ public class Picture extends SimpleShape {
if(img != null) {
// Valid image, set anchor from it
- setAnchor(new java.awt.Rectangle(0, 0, img.getWidth(), img.getHeight()));
+ setAnchor(new java.awt.Rectangle(0, 0, img.getWidth()*POINT_DPI/PIXEL_DPI, img.getHeight()*POINT_DPI/PIXEL_DPI));
} else {
// Invalid image, go with the default metafile size
setAnchor(new java.awt.Rectangle(0, 0, 200, 200));