Docs For Class PHPExcel_Style_Fill

PHPExcel_Style

# Class: PHPExcel_Style_Fill

Source Location: /PHPExcel/Style/Fill.php

### Class Overview

PHPExcel_Style_Fill

#### Author(s):

#### Copyright:

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

Implements interfaces:

- PHPExcel_IComparable

### Constants

- FILL_GRADIENT_LINEAR
- FILL_GRADIENT_PATH
- FILL_NONE
- FILL_PATTERN_DARKDOWN
- FILL_PATTERN_DARKGRAY
- FILL_PATTERN_DARKGRID
- FILL_PATTERN_DARKHORIZONTAL
- FILL_PATTERN_DARKTRELLIS
- FILL_PATTERN_DARKUP
- FILL_PATTERN_DARKVERTICAL
- FILL_PATTERN_GRAY0625
- FILL_PATTERN_GRAY125
- FILL_PATTERN_LIGHTDOWN
- FILL_PATTERN_LIGHTGRAY
- FILL_PATTERN_LIGHTGRID
- FILL_PATTERN_LIGHTHORIZONTAL
- FILL_PATTERN_LIGHTTRELLIS
- FILL_PATTERN_LIGHTUP
- FILL_PATTERN_LIGHTVERTICAL
- FILL_PATTERN_MEDIUMGRAY
- FILL_SOLID

### Methods

- __construct
- applyFromArray
- bindParent
- getActiveCell
- getActiveSheet
- getEndColor
- getFillType
- getHashCode
- getIsSupervisor
- getRotation
- getSelectedCells
- getSharedComponent
- getStartColor
- getStyleArray
- setEndColor
- setFillType
- setRotation
- setStartColor
- __clone

### Class Details

[line 36]
PHPExcel_Style_Fill

#### Tags:

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

[ Top ]

### Class Methods

### constructor __construct [line 113]

`PHPExcel_Style_Fill __construct( [ $isSupervisor = false])`

Create a new PHPExcel_Style_Fill

#### Tags:

access: | public

#### Parameters:

| $isSupervisor |

[ Top ]

### method applyFromArray [line 227]

`PHPExcel_Style_Fill applyFromArray( [array $pStyles = null])`

Apply styles from array

1. $objPHPExcel-> getActiveSheet()->getStyle('B2')->getFill()-> applyFromArray(
2. array(
3. 'type' => PHPExcel_Style_Fill:: FILL_GRADIENT_LINEAR,
4. 'rotation' => 0,
5. 'startcolor' => array(
6. 'rgb' => '000000'
7. ),
8. 'endcolor' => array(
9. 'argb' => 'FFFFFFFF'
10. )
11. )
12. );

#### Tags:

throws: | Exception
access: | public

#### Parameters:

array | $pStyles | Array containing style information

[ Top ]

### method bindParent [line 135]

`PHPExcel_Style_Fill bindParent( PHPExcel_Style $parent)`

Bind parent. Only used for supervisor

#### Tags:

access: | public

#### Parameters:

PHPExcel_Style | $parent |

[ Top ]

### method getActiveCell [line 189]

`string getActiveCell( )`

Get the currently active cell coordinate in currently active sheet.

Only used for supervisor

#### Tags:

return: | E.g. 'A1'
access: | public

[ Top ]

### method getActiveSheet [line 167]

`PHPExcel_Worksheet getActiveSheet( )`

Get the currently active sheet. Only used for supervisor

#### Tags:

access: | public

[ Top ]

### method getEndColor [line 344]

`PHPExcel_Style_Color getEndColor( )`

Get End Color

#### Tags:

access: | public

[ Top ]

### method getFillType [line 259]

`string getFillType( )`

Get Fill Type

#### Tags:

access: | public

[ Top ]

### method getHashCode [line 373]

`string getHashCode( )`

Get hash code

#### Tags:

return: | Hash code
access: | public

[ Top ]

### method getIsSupervisor [line 146]

`boolean getIsSupervisor( )`

Is this a supervisor or a real style component?

#### Tags:

access: | public

[ Top ]

### method getRotation [line 287]

`double getRotation( )`

Get Rotation

#### Tags:

access: | public

[ Top ]

### method getSelectedCells [line 178]

`string getSelectedCells( )`

Get the currently active cell coordinate in currently active sheet.

Only used for supervisor

#### Tags:

return: | E.g. 'A1'
access: | public

[ Top ]

### method getSharedComponent [line 157]

`PHPExcel_Style_Fill getSharedComponent( )`

Get the shared style component for the currently active cell in currently active sheet.

Only used for style supervisor

#### Tags:

access: | public

[ Top ]

### method getStartColor [line 315]

`PHPExcel_Style_Color getStartColor( )`

Get Start Color

#### Tags:

access: | public

[ Top ]

### method getStyleArray [line 200]

`array getStyleArray( array $array)`

Build style array from subcomponents

#### Tags:

access: | public

#### Parameters:

array | $array |

[ Top ]

### method setEndColor [line 355]

`PHPExcel_Style_Fill setEndColor( [PHPExcel_Style_Color $pValue = null])`

Set End Color

#### Tags:

throws: | Exception
access: | public

#### Parameters:

PHPExcel_Style_Color | $pValue |

[ Top ]

### method setFillType [line 272]

`PHPExcel_Style_Fill setFillType( [string $pValue = PHPExcel_Style_Fill::FILL_NONE])`

Set Fill Type

#### Tags:

access: | public

#### Parameters:

string | $pValue | PHPExcel_Style_Fill fill type

[ Top ]

### method setRotation [line 300]

`PHPExcel_Style_Fill setRotation( [double $pValue = 0])`

Set Rotation

#### Tags:

access: | public

#### Parameters:

double | $pValue |

[ Top ]

### method setStartColor [line 326]

`PHPExcel_Style_Fill setStartColor( [PHPExcel_Style_Color $pValue = null])`

Set Start Color

#### Tags:

throws: | Exception
access: | public

#### Parameters:

PHPExcel_Style_Color | $pValue |

[ Top ]

### method __clone [line 389]

`void __clone( )`

Implement PHP __clone to create a deep clone, not just a shallow copy.

#### Tags:

access: | public

[ Top ]

### Class Constants

#### FILL_GRADIENT_LINEAR = 'linear'

[line 41]

[ Top ]

#### FILL_GRADIENT_PATH = 'path'

[line 42]

[ Top ]

#### FILL_NONE = 'none'

[line 39]

[ Top ]

#### FILL_PATTERN_DARKDOWN = 'darkDown'

[line 43]

[ Top ]

#### FILL_PATTERN_DARKGRAY = 'darkGray'

[line 44]

[ Top ]

#### FILL_PATTERN_DARKGRID = 'darkGrid'

[line 45]

[ Top ]

#### FILL_PATTERN_DARKHORIZONTAL = 'darkHorizontal'

[line 46]

[ Top ]

#### FILL_PATTERN_DARKTRELLIS = 'darkTrellis'

[line 47]

[ Top ]

#### FILL_PATTERN_DARKUP = 'darkUp'

[line 48]

[ Top ]

#### FILL_PATTERN_DARKVERTICAL = 'darkVertical'

[line 49]

[ Top ]

#### FILL_PATTERN_GRAY0625 = 'gray0625'

[line 50]

[ Top ]

#### FILL_PATTERN_GRAY125 = 'gray125'

[line 51]

[ Top ]

#### FILL_PATTERN_LIGHTDOWN = 'lightDown'

[line 52]

[ Top ]

#### FILL_PATTERN_LIGHTGRAY = 'lightGray'

[line 53]

[ Top ]

#### FILL_PATTERN_LIGHTGRID = 'lightGrid'

[line 54]

[ Top ]

#### FILL_PATTERN_LIGHTHORIZONTAL = 'lightHorizontal'

[line 55]

[ Top ]

#### FILL_PATTERN_LIGHTTRELLIS = 'lightTrellis'

[line 56]

[ Top ]

#### FILL_PATTERN_LIGHTUP = 'lightUp'

[line 57]

[ Top ]

#### FILL_PATTERN_LIGHTVERTICAL = 'lightVertical'

[line 58]

[ Top ]

#### FILL_PATTERN_MEDIUMGRAY = 'mediumGray'

[line 59]

[ Top ]

#### FILL_SOLID = 'solid'

[line 40]

[ Top ]

Documentation generated on Sun, 27 Feb 2011 16:31:32 -0800 by phpDocumentor 1.4.3