\PhpOffice\PhpSpreadsheet\SharedDrawing

Summary

Methods
Properties
Constants
pixelsToEMU()
EMUToPixels()
pixelsToCellDimension()
cellDimensionToPixels()
pixelsToPoints()
pointsToPixels()
degreesToAngle()
angleToDegrees()
imagecreatefrombmp()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

pixelsToEMU()

pixelsToEMU(integer  $pValue) : integer

Convert pixels to EMU.

Parameters

integer $pValue

Value in pixels

Returns

integer —

Value in EMU

EMUToPixels()

EMUToPixels(integer  $pValue) : integer

Convert EMU to pixels.

Parameters

integer $pValue

Value in EMU

Returns

integer —

Value in pixels

pixelsToCellDimension()

pixelsToCellDimension(integer  $pValue, \PhpOffice\PhpSpreadsheet\Style\Font  $pDefaultFont) : integer

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

integer $pValue

Value in pixels

\PhpOffice\PhpSpreadsheet\Style\Font $pDefaultFont

Default font of the workbook

Returns

integer —

Value in cell dimension

cellDimensionToPixels()

cellDimensionToPixels(float  $pValue, \PhpOffice\PhpSpreadsheet\Style\Font  $pDefaultFont) : integer

Convert column width from (intrinsic) Excel units to pixels.

Parameters

float $pValue

Value in cell dimension

\PhpOffice\PhpSpreadsheet\Style\Font $pDefaultFont

Default font of the workbook

Returns

integer —

Value in pixels

pixelsToPoints()

pixelsToPoints(integer  $pValue) : float

Convert pixels to points.

Parameters

integer $pValue

Value in pixels

Returns

float —

Value in points

pointsToPixels()

pointsToPixels(integer  $pValue) : integer

Convert points to pixels.

Parameters

integer $pValue

Value in points

Returns

integer —

Value in pixels

degreesToAngle()

degreesToAngle(integer  $pValue) : integer

Convert degrees to angle.

Parameters

integer $pValue

Degrees

Returns

integer —

Angle

angleToDegrees()

angleToDegrees(integer  $pValue) : integer

Convert angle to degrees.

Parameters

integer $pValue

Angle

Returns

integer —

Degrees

imagecreatefrombmp()

imagecreatefrombmp(string  $p_sFile) : resource

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

Parameters

string $p_sFile

Path to Windows DIB (BMP) image

Returns

resource