Docs For Class PHPExcel_Shared_Drawing

PHPExcel_Shared

# Class: PHPExcel_Shared_Drawing

Source Location: /PHPExcel/Shared/Drawing.php

### Class Overview

PHPExcel_Shared_Drawing

#### Author(s):

#### Copyright:

- Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

### Methods

- angleToDegrees
- cellDimensionToPixels
- degreesToAngle
- EMUToPixels
- imagecreatefrombmp
- pixelsToCellDimension
- pixelsToEMU
- pixelsToPoints
- pointsToPixels

### Class Details

[line 36]
PHPExcel_Shared_Drawing

#### Tags:

copyright: | Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

[ Top ]

### Class Methods

### static method angleToDegrees [line 164]

`static int angleToDegrees( [int $pValue = 0])`

Convert angle to degrees

#### Tags:

return: | Degrees
access: | public

#### Parameters:

int | $pValue | Angle

[ Top ]

### static method cellDimensionToPixels [line 99]

`static int cellDimensionToPixels( [float $pValue = 0], $pDefaultFont)`

Convert column width from (intrinsic) Excel units to pixels

#### Tags:

return: | Value in pixels
access: | public

#### Parameters:

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

[ Top ]

### static method degreesToAngle [line 154]

`static int degreesToAngle( [int $pValue = 0])`

Convert degrees to angle

#### Tags:

return: | Angle
access: | public

#### Parameters:

int | $pValue | Degrees

[ Top ]

### static method EMUToPixels [line 54]

`static int EMUToPixels( [int $pValue = 0])`

Convert EMU to pixels

#### Tags:

return: | Value in pixels
access: | public

#### Parameters:

int | $pValue | Value in EMU

[ Top ]

### static method imagecreatefrombmp [line 179]

`static resource imagecreatefrombmp( $p_sFile, string $filename)`

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

#### Tags:

link: | http://www.php.net/manual/en/function.imagecreatefromwbmp.php#86214
access: | public

#### Parameters:

string | $filename | Path to Windows DIB (BMP) image
| $p_sFile |

[ Top ]

### static method pixelsToCellDimension [line 71]

`static int pixelsToCellDimension( [int $pValue = 0], $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.

#### Tags:

return: | Value in cell dimension
access: | public

#### Parameters:

int | $pValue | Value in pixels
PHPExcel_Style_Font | $pDefaultFont | Default font of the workbook

[ Top ]

### static method pixelsToEMU [line 44]

`static int pixelsToEMU( [int $pValue = 0])`

Convert pixels to EMU

#### Tags:

return: | Value in EMU
access: | public

#### Parameters:

int | $pValue | Value in pixels

[ Top ]

### static method pixelsToPoints [line 130]

`static int pixelsToPoints( [int $pValue = 0])`

Convert pixels to points

#### Tags:

return: | Value in points
access: | public

#### Parameters:

int | $pValue | Value in pixels

[ Top ]

### static method pointsToPixels [line 140]

`static int pointsToPixels( [int $pValue = 0])`

Convert points to pixels

#### Tags:

return: | Value in pixels
access: | public

#### Parameters:

int | $pValue | Value in points

[ Top ]

Documentation generated on Sun, 27 Feb 2011 16:30:19 -0800 by phpDocumentor 1.4.3