Skip to content

Commit c524394

Browse files
author
Bas-Jan 't Jong
committed
Fixed conversion factor Centimeters to Pixels and vice versa.
1 parent 516c13e commit c524394

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PhpWord/Shared/Drawing.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public static function angleToDegrees($value = 0)
108108
*/
109109
public static function pixelsToCentimeters($value = 0)
110110
{
111-
return $value * 0.028;
111+
return $value * 0.026458333;
112112
}
113113

114114
/**
@@ -120,7 +120,7 @@ public static function pixelsToCentimeters($value = 0)
120120
public static function centimetersToPixels($value = 0)
121121
{
122122
if ($value != 0) {
123-
return $value / 0.028;
123+
return $value / 0.026458333;
124124
} else {
125125
return 0;
126126
}

0 commit comments

Comments
 (0)