class PHPExcel_Shared_Drawing

PHPExcelSharedDrawing

Methods

static int
pixelsToEMU(int $pValue)

Convert pixels to EMU

static int
EMUToPixels(int $pValue)

Convert EMU to pixels

static int
pixelsToCellDimension(int $pValue, PHPExcel_Style_Font $pDefaultFont)

Convert pixels to column width. Exact algorithm not known.

static int
cellDimensionToPixels(float $pValue, PHPExcel_Style_Font $pDefaultFont)

Convert column width from (intrinsic) Excel units to pixels

static int
pixelsToPoints(int $pValue)

Convert pixels to points

static int
pointsToPixels(int $pValue)

Convert points to pixels

static int
degreesToAngle(int $pValue)

Convert degrees to angle

static int
angleToDegrees(int $pValue)

Convert angle to degrees

static resource
imagecreatefrombmp($p_sFile)

Create a new image from file. By alexander at alexauto dot nl

Details

at line 53
static int pixelsToEMU(int $pValue)

Convert pixels to EMU

Parameters

int $pValue Value in pixels

Return Value

int Value in EMU

at line 64
static int EMUToPixels(int $pValue)

Convert EMU to pixels

Parameters

int $pValue Value in EMU

Return Value

int Value in pixels

at line 82
static int pixelsToCellDimension(int $pValue, PHPExcel_Style_Font $pDefaultFont)

Convert pixels to column width. 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 $pValue Value in pixels
PHPExcel_Style_Font $pDefaultFont Default font of the workbook

Return Value

int Value in cell dimension

at line 107
static int cellDimensionToPixels(float $pValue, PHPExcel_Style_Font $pDefaultFont)

Convert column width from (intrinsic) Excel units to pixels

Parameters

float $pValue Value in cell dimension
PHPExcel_Style_Font $pDefaultFont Default font of the workbook

Return Value

int Value in pixels

at line 134
static int pixelsToPoints(int $pValue)

Convert pixels to points

Parameters

int $pValue Value in pixels

Return Value

int Value in points

at line 145
static int pointsToPixels(int $pValue)

Convert points to pixels

Parameters

int $pValue Value in points

Return Value

int Value in pixels

at line 160
static int degreesToAngle(int $pValue)

Convert degrees to angle

Parameters

int $pValue Degrees

Return Value

int Angle

at line 171
static int angleToDegrees(int $pValue)

Convert angle to degrees

Parameters

int $pValue Angle

Return Value

int Degrees

at line 187
static resource imagecreatefrombmp($p_sFile)

Create a new image from file. By alexander at alexauto dot nl

Parameters

$p_sFile

Return Value

resource