ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
PHPExcel_Shared_Drawing Class Reference
+ Collaboration diagram for PHPExcel_Shared_Drawing:

Static Public Member Functions

static pixelsToEMU ($pValue=0)
 Convert pixels to EMU.
static EMUToPixels ($pValue=0)
 Convert EMU to pixels.
static pixelsToCellDimension ($pValue=0, $pFontSize=11)
 Convert pixels to cell dimension.
static cellDimensionToPixels ($pValue=0, $pFontSize=11)
 Convert cell width to pixels.
static pixelsToPoints ($pValue=0)
 Convert pixels to points.
static pointsToPixels ($pValue=0)
 Convert points to pixels.
static degreesToAngle ($pValue=0)
 Convert degrees to angle.
static angleToDegrees ($pValue=0)
 Convert angle to degrees.

Detailed Description

Definition at line 36 of file Drawing.php.

Member Function Documentation

static PHPExcel_Shared_Drawing::angleToDegrees (   $pValue = 0)
static

Convert angle to degrees.

Parameters
int$pValueAngle
Returns
int Degrees

Definition at line 130 of file Drawing.php.

Referenced by PHPExcel_Reader_Excel2007\load().

{
if ($pValue != 0) {
return round($pValue / 60000);
} else {
return 0;
}
}

+ Here is the caller graph for this function:

static PHPExcel_Shared_Drawing::cellDimensionToPixels (   $pValue = 0,
  $pFontSize = 11 
)
static

Convert cell width to pixels.

Parameters
int$pValueValue in cell dimension
int$pFontSizeDefault font size of workbook
Returns
int Value in pixels

Definition at line 82 of file Drawing.php.

Referenced by PHPExcel_Writer_HTML\buildCSS(), and PHPExcel_Shared_Excel5\sizeCol().

{
if ($pValue != 0) {
return $pValue * 7 * $pFontSize / 11;
} else {
return 0;
}
}

+ Here is the caller graph for this function:

static PHPExcel_Shared_Drawing::degreesToAngle (   $pValue = 0)
static

Convert degrees to angle.

Parameters
int$pValueDegrees
Returns
int Angle

Definition at line 120 of file Drawing.php.

Referenced by PHPExcel_Writer_Excel2007_Drawing\_writeDrawing().

{
return (int)round($pValue * 60000);
}

+ Here is the caller graph for this function:

static PHPExcel_Shared_Drawing::EMUToPixels (   $pValue = 0)
static

Convert EMU to pixels.

Parameters
int$pValueValue in EMU
Returns
int Value in pixels

Definition at line 54 of file Drawing.php.

Referenced by PHPExcel_Reader_Excel2007\load().

{
if ($pValue != 0) {
return round($pValue / 9525);
} else {
return 0;
}
}

+ Here is the caller graph for this function:

static PHPExcel_Shared_Drawing::pixelsToCellDimension (   $pValue = 0,
  $pFontSize = 11 
)
static

Convert pixels to cell dimension.

Exact algorithm not known. By inspection of a real Excel file using Calibri 11, one finds 1000px ~ 142.85546875 This gives a conversion factor of 7. Also, we assume that pixels and font size are proportional.

Parameters
int$pValueValue in pixels
int$pFontSizeDefault font size of workbook
Returns
int Value in cell dimension

Definition at line 71 of file Drawing.php.

{
return $pValue * $pFontSize / 11 / 7;
}
static PHPExcel_Shared_Drawing::pixelsToEMU (   $pValue = 0)
static

Convert pixels to EMU.

Parameters
int$pValueValue in pixels
Returns
int Value in EMU

Definition at line 44 of file Drawing.php.

Referenced by PHPExcel_Writer_Excel2007_Drawing\_writeDrawing().

{
return round($pValue * 9525);
}

+ Here is the caller graph for this function:

static PHPExcel_Shared_Drawing::pixelsToPoints (   $pValue = 0)
static

Convert pixels to points.

Parameters
int$pValueValue in pixels
Returns
int Value in points

Definition at line 96 of file Drawing.php.

Referenced by PHPExcel_Writer_HTML\buildCSS().

{
return $pValue * 0.67777777;
}

+ Here is the caller graph for this function:

static PHPExcel_Shared_Drawing::pointsToPixels (   $pValue = 0)
static

Convert points to pixels.

Parameters
int$pValueValue in points
Returns
int Value in pixels

Definition at line 106 of file Drawing.php.

Referenced by PHPExcel_Shared_Excel5\sizeRow().

{
if ($pValue != 0) {
return (int) ceil($pValue * 1.333333333);
} else {
return 0;
}
}

+ Here is the caller graph for this function:


The documentation for this class was generated from the following file: