Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'develop' of https://github.com/PHPOffice/PHPPowerPoint

…into develop
  • Loading branch information...
commit a0d5f4cd2d69d6dcd414d9b6498f4ea84ebf84ad 2 parents d72206b + 9ecbec1
@MarkBaker MarkBaker authored
Showing with 7 additions and 2 deletions.
  1. +6 −2 Classes/PHPPowerPoint/Shared/Drawing.php
  2. +1 −0  changelog.txt
View
8 Classes/PHPPowerPoint/Shared/Drawing.php
@@ -35,6 +35,9 @@
*/
class PHPPowerPoint_Shared_Drawing
{
+
+ const DPI_96 = 96;
+
/**
* Convert pixels to EMU
*
@@ -90,7 +93,8 @@ public static function pointsToPixels($pValue = 0) {
* @return int Value in centimeters
*/
public static function pixelsToCentimeters($pValue = 0) {
- return $pValue * 0.028;
+ //return $pValue * 0.028;
+ return (($pValue / self::DPI_96) * 2.54);
}
/**
@@ -101,7 +105,7 @@ public static function pixelsToCentimeters($pValue = 0) {
*/
public static function centimetersToPixels($pValue = 0) {
if ($pValue != 0) {
- return $pValue * 0.028;
+ return ($pValue / 2.54) * self::DPI_96;
} else {
return 0;
}
View
1  changelog.txt
@@ -42,6 +42,7 @@ To be planned:
- Feature: (MB) Work item 5580 - Editing chart data
- Feature: (MB) Work item 5461 - Solid Fill support
- Feature: (MB) Applied patch 8375
+- Feature: (Progi1984) Implement ODP Writer
- Bugfix: (MBaker) Allow solid colour fill
- Bugfix: (MB) Work item 3910 - Table width setting Office 2007
- Bugfix: (MB) Work item 4598 - Bullet characters in Master Slide Layouts of template file become corrupted
Please sign in to comment.
Something went wrong with that request. Please try again.