ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
PHPExcel_Worksheet_HeaderFooterDrawing Class Reference
+ Inheritance diagram for PHPExcel_Worksheet_HeaderFooterDrawing:
+ Collaboration diagram for PHPExcel_Worksheet_HeaderFooterDrawing:

Public Member Functions

 __construct ()
 Create a new PHPExcel_Worksheet_HeaderFooterDrawing.
 getName ()
 Get Name.
 setName ($pValue= '')
 Set Name.
 getOffsetX ()
 Get OffsetX.
 setOffsetX ($pValue=0)
 Set OffsetX.
 getOffsetY ()
 Get OffsetY.
 setOffsetY ($pValue=0)
 Set OffsetY.
 getWidth ()
 Get Width.
 setWidth ($pValue=0)
 Set Width.
 getHeight ()
 Get Height.
 setHeight ($pValue=0)
 Set Height.
 setWidthAndHeight ($width=0, $height=0)
 Set width and height with proportional resize Example: $objDrawing->setResizeProportional(true); $objDrawing->setWidthAndHeight(160,120);
 getResizeProportional ()
 Get ResizeProportional.
 setResizeProportional ($pValue=true)
 Set ResizeProportional.
 getFilename ()
 Get Filename.
 getExtension ()
 Get Extension.
 getPath ()
 Get Path.
 setPath ($pValue= '', $pVerifyFile=true)
 Set Path.
 getHashCode ()
 Get hash code.
 __clone ()
 Implement PHP __clone to create a deep clone, not just a shallow copy.
- Public Member Functions inherited from PHPExcel_Worksheet_Drawing
 getIndexedFilename ()
 Get indexed filename (using image index)
- Public Member Functions inherited from PHPExcel_Worksheet_BaseDrawing
 getImageIndex ()
 Get image index.
 getDescription ()
 Get Description.
 setDescription ($pValue= '')
 Set Description.
 getWorksheet ()
 Get Worksheet.
 setWorksheet (PHPExcel_Worksheet $pValue=null, $pOverrideOld=false)
 Set Worksheet.
 getCoordinates ()
 Get Coordinates.
 setCoordinates ($pValue= 'A1')
 Set Coordinates.
 getRotation ()
 Get Rotation.
 setRotation ($pValue=0)
 Set Rotation.
 getShadow ()
 Get Shadow.
 setShadow (PHPExcel_Worksheet_Drawing_Shadow $pValue=null)
 Set Shadow.

Protected Attributes

 $_name
 $_offsetX
 $_offsetY
 $_width
 $_height
 $_resizeProportional

Private Attributes

 $_path

Detailed Description

Definition at line 36 of file HeaderFooterDrawing.php.

Constructor & Destructor Documentation

PHPExcel_Worksheet_HeaderFooterDrawing::__construct ( )

Create a new PHPExcel_Worksheet_HeaderFooterDrawing.

Reimplemented from PHPExcel_Worksheet_Drawing.

Definition at line 90 of file HeaderFooterDrawing.php.

{
// Initialise values
$this->_path = '';
$this->_name = '';
$this->_offsetX = 0;
$this->_offsetY = 0;
$this->_width = 0;
$this->_height = 0;
$this->_resizeProportional = true;
}

Member Function Documentation

PHPExcel_Worksheet_HeaderFooterDrawing::__clone ( )

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

Reimplemented from PHPExcel_Worksheet_Drawing.

Definition at line 340 of file HeaderFooterDrawing.php.

{
$vars = get_object_vars($this);
foreach ($vars as $key => $value) {
if (is_object($value)) {
$this->$key = clone $value;
} else {
$this->$key = $value;
}
}
}
PHPExcel_Worksheet_HeaderFooterDrawing::getExtension ( )

Get Extension.

Returns
string

Reimplemented from PHPExcel_Worksheet_Drawing.

Definition at line 280 of file HeaderFooterDrawing.php.

{
$parts = explode(".", basename($this->_path));
return end($parts);
}
PHPExcel_Worksheet_HeaderFooterDrawing::getFilename ( )

Get Filename.

Returns
string

Reimplemented from PHPExcel_Worksheet_Drawing.

Definition at line 271 of file HeaderFooterDrawing.php.

{
return basename($this->_path);
}
PHPExcel_Worksheet_HeaderFooterDrawing::getHashCode ( )

Get hash code.

Returns
string Hash code

Implements PHPExcel_IComparable.

Definition at line 325 of file HeaderFooterDrawing.php.

{
return md5(
$this->_path
. $this->_name
. $this->_offsetX
. $this->_offsetY
. $this->_width
. $this->_height
. __CLASS__
);
}
PHPExcel_Worksheet_HeaderFooterDrawing::getHeight ( )

Get Height.

Returns
int

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 195 of file HeaderFooterDrawing.php.

References $_height.

{
}
PHPExcel_Worksheet_HeaderFooterDrawing::getName ( )

Get Name.

Returns
string

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 107 of file HeaderFooterDrawing.php.

References $_name.

{
return $this->_name;
}
PHPExcel_Worksheet_HeaderFooterDrawing::getOffsetX ( )

Get OffsetX.

Returns
int

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 127 of file HeaderFooterDrawing.php.

References $_offsetX.

{
}
PHPExcel_Worksheet_HeaderFooterDrawing::getOffsetY ( )

Get OffsetY.

Returns
int

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 147 of file HeaderFooterDrawing.php.

References $_offsetY.

{
}
PHPExcel_Worksheet_HeaderFooterDrawing::getPath ( )

Get Path.

Returns
string

Reimplemented from PHPExcel_Worksheet_Drawing.

Definition at line 290 of file HeaderFooterDrawing.php.

References $_path.

{
return $this->_path;
}
PHPExcel_Worksheet_HeaderFooterDrawing::getResizeProportional ( )

Get ResizeProportional.

Returns
boolean

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 251 of file HeaderFooterDrawing.php.

References $_resizeProportional.

PHPExcel_Worksheet_HeaderFooterDrawing::getWidth ( )

Get Width.

Returns
int

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 167 of file HeaderFooterDrawing.php.

References $_width.

{
return $this->_width;
}
PHPExcel_Worksheet_HeaderFooterDrawing::setHeight (   $pValue = 0)

Set Height.

Parameters
int$pValue
Returns
PHPExcel_Worksheet_HeaderFooterDrawing

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 205 of file HeaderFooterDrawing.php.

References $_height.

{
// Resize proportional?
if ($this->_resizeProportional && $pValue != 0) {
$ratio = $this->_width / $this->_height;
$this->_width = round($ratio * $pValue);
}
// Set height
$this->_height = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooterDrawing::setName (   $pValue = '')

Set Name.

Parameters
string$pValue
Returns
PHPExcel_Worksheet_HeaderFooterDrawing

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 117 of file HeaderFooterDrawing.php.

{
$this->_name = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooterDrawing::setOffsetX (   $pValue = 0)

Set OffsetX.

Parameters
int$pValue
Returns
PHPExcel_Worksheet_HeaderFooterDrawing

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 137 of file HeaderFooterDrawing.php.

{
$this->_offsetX = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooterDrawing::setOffsetY (   $pValue = 0)

Set OffsetY.

Parameters
int$pValue
Returns
PHPExcel_Worksheet_HeaderFooterDrawing

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 157 of file HeaderFooterDrawing.php.

{
$this->_offsetY = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooterDrawing::setPath (   $pValue = '',
  $pVerifyFile = true 
)

Set Path.

Parameters
string$pValueFile path
boolean$pVerifyFileVerify file
Exceptions
Exception
Returns
PHPExcel_Worksheet_HeaderFooterDrawing

Reimplemented from PHPExcel_Worksheet_Drawing.

Definition at line 302 of file HeaderFooterDrawing.php.

{
if ($pVerifyFile) {
if (file_exists($pValue)) {
$this->_path = $pValue;
if ($this->_width == 0 && $this->_height == 0) {
// Get width/height
list($this->_width, $this->_height) = getimagesize($pValue);
}
} else {
throw new Exception("File $pValue not found!");
}
} else {
$this->_path = $pValue;
}
return $this;
}
PHPExcel_Worksheet_HeaderFooterDrawing::setResizeProportional (   $pValue = true)

Set ResizeProportional.

Parameters
boolean$pValue
Returns
PHPExcel_Worksheet_HeaderFooterDrawing

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 261 of file HeaderFooterDrawing.php.

{
$this->_resizeProportional = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooterDrawing::setWidth (   $pValue = 0)

Set Width.

Parameters
int$pValue
Returns
PHPExcel_Worksheet_HeaderFooterDrawing

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 177 of file HeaderFooterDrawing.php.

References $_height.

{
// Resize proportional?
if ($this->_resizeProportional && $pValue != 0) {
$ratio = $this->_width / $this->_height;
$this->_height = round($ratio * $pValue);
}
// Set width
$this->_width = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooterDrawing::setWidthAndHeight (   $width = 0,
  $height = 0 
)

Set width and height with proportional resize Example: $objDrawing->setResizeProportional(true); $objDrawing->setWidthAndHeight(160,120);

Author
Vincent MSN:kele_.nosp@m.100@.nosp@m.hotma.nosp@m.il.c.nosp@m.om
Parameters
int$width
int$height
Returns
PHPExcel_Worksheet_HeaderFooterDrawing

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 231 of file HeaderFooterDrawing.php.

References $_height, and $_width.

{
$xratio = $width / $this->_width;
$yratio = $height / $this->_height;
if ($this->_resizeProportional && !($width == 0 || $height == 0)) {
if (($xratio * $this->_height) < $height) {
$this->_height = ceil($xratio * $this->_height);
$this->_width = $width;
} else {
$this->_width = ceil($yratio * $this->_width);
$this->_height = $height;
}
}
return $this;
}

Field Documentation

PHPExcel_Worksheet_HeaderFooterDrawing::$_height
protected

Definition at line 78 of file HeaderFooterDrawing.php.

Referenced by getHeight(), setHeight(), setWidth(), and setWidthAndHeight().

PHPExcel_Worksheet_HeaderFooterDrawing::$_name
protected

Definition at line 50 of file HeaderFooterDrawing.php.

Referenced by getName().

PHPExcel_Worksheet_HeaderFooterDrawing::$_offsetX
protected

Definition at line 57 of file HeaderFooterDrawing.php.

Referenced by getOffsetX().

PHPExcel_Worksheet_HeaderFooterDrawing::$_offsetY
protected

Definition at line 64 of file HeaderFooterDrawing.php.

Referenced by getOffsetY().

PHPExcel_Worksheet_HeaderFooterDrawing::$_path
private

Definition at line 43 of file HeaderFooterDrawing.php.

Referenced by getPath().

PHPExcel_Worksheet_HeaderFooterDrawing::$_resizeProportional
protected

Definition at line 85 of file HeaderFooterDrawing.php.

Referenced by getResizeProportional().

PHPExcel_Worksheet_HeaderFooterDrawing::$_width
protected

Definition at line 71 of file HeaderFooterDrawing.php.

Referenced by getWidth(), and setWidthAndHeight().


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