From c524394f5f3e080dd6696a43bec6265a5a61992f Mon Sep 17 00:00:00 2001 From: Bas-Jan 't Jong Date: Sat, 10 May 2014 23:52:10 +0200 Subject: [PATCH] Fixed conversion factor Centimeters to Pixels and vice versa. --- src/PhpWord/Shared/Drawing.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PhpWord/Shared/Drawing.php b/src/PhpWord/Shared/Drawing.php index 825ce8f175..f1d61eb6aa 100644 --- a/src/PhpWord/Shared/Drawing.php +++ b/src/PhpWord/Shared/Drawing.php @@ -108,7 +108,7 @@ public static function angleToDegrees($value = 0) */ public static function pixelsToCentimeters($value = 0) { - return $value * 0.028; + return $value * 0.026458333; } /** @@ -120,7 +120,7 @@ public static function pixelsToCentimeters($value = 0) public static function centimetersToPixels($value = 0) { if ($value != 0) { - return $value / 0.028; + return $value / 0.026458333; } else { return 0; }