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
This commit is contained in:
parent
5cf00bc2a6
commit
51840d63ad
@ -147,7 +147,7 @@ public class Picture extends SimpleShape {
|
|||||||
|
|
||||||
if(img != null) {
|
if(img != null) {
|
||||||
// Valid image, set anchor from it
|
// 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 {
|
} else {
|
||||||
// Invalid image, go with the default metafile size
|
// Invalid image, go with the default metafile size
|
||||||
setAnchor(new java.awt.Rectangle(0, 0, 200, 200));
|
setAnchor(new java.awt.Rectangle(0, 0, 200, 200));
|
||||||
|
Loading…
Reference in New Issue
Block a user