Definition at line 36 of file BaseDrawing.php.
◆ __construct()
PHPExcel_Worksheet_BaseDrawing::__construct |
( |
| ) |
|
Create a new PHPExcel_Worksheet_BaseDrawing.
Definition at line 132 of file BaseDrawing.php.
136 $this->_description =
'';
137 $this->_worksheet = null;
138 $this->_coordinates =
'A1';
143 $this->_resizeProportional =
true;
144 $this->_rotation = 0;
148 self::$_imageCounter++;
149 $this->_imageIndex = self::$_imageCounter;
◆ __clone()
PHPExcel_Worksheet_BaseDrawing::__clone |
( |
| ) |
|
Implement PHP __clone to create a deep clone, not just a shallow copy.
Definition at line 479 of file BaseDrawing.php.
480 $vars = get_object_vars($this);
481 foreach ($vars as $key => $value) {
482 if (is_object($value)) {
483 $this->$key = clone $value;
485 $this->$key = $value;
◆ getCoordinates()
PHPExcel_Worksheet_BaseDrawing::getCoordinates |
( |
| ) |
|
◆ getDescription()
PHPExcel_Worksheet_BaseDrawing::getDescription |
( |
| ) |
|
◆ getHashCode()
PHPExcel_Worksheet_BaseDrawing::getHashCode |
( |
| ) |
|
Get hash code.
- Returns
- string Hash code
Implements PHPExcel_IComparable.
Definition at line 460 of file BaseDrawing.php.
Referenced by setWorksheet().
463 . $this->_description
464 . $this->_worksheet->getHashCode()
465 . $this->_coordinates
471 . $this->_shadow->getHashCode()
◆ getHeight()
PHPExcel_Worksheet_BaseDrawing::getHeight |
( |
| ) |
|
◆ getImageIndex()
PHPExcel_Worksheet_BaseDrawing::getImageIndex |
( |
| ) |
|
◆ getName()
PHPExcel_Worksheet_BaseDrawing::getName |
( |
| ) |
|
◆ getOffsetX()
PHPExcel_Worksheet_BaseDrawing::getOffsetX |
( |
| ) |
|
◆ getOffsetY()
PHPExcel_Worksheet_BaseDrawing::getOffsetY |
( |
| ) |
|
◆ getResizeProportional()
PHPExcel_Worksheet_BaseDrawing::getResizeProportional |
( |
| ) |
|
◆ getRotation()
PHPExcel_Worksheet_BaseDrawing::getRotation |
( |
| ) |
|
◆ getShadow()
PHPExcel_Worksheet_BaseDrawing::getShadow |
( |
| ) |
|
◆ getWidth()
PHPExcel_Worksheet_BaseDrawing::getWidth |
( |
| ) |
|
◆ getWorksheet()
PHPExcel_Worksheet_BaseDrawing::getWorksheet |
( |
| ) |
|
◆ setCoordinates()
PHPExcel_Worksheet_BaseDrawing::setCoordinates |
( |
|
$pValue = 'A1' | ) |
|
◆ setDescription()
PHPExcel_Worksheet_BaseDrawing::setDescription |
( |
|
$pValue = '' | ) |
|
◆ setHeight()
PHPExcel_Worksheet_BaseDrawing::setHeight |
( |
|
$pValue = 0 | ) |
|
Set Height.
- Parameters
-
- Returns
- PHPExcel_Worksheet_BaseDrawing
Definition at line 349 of file BaseDrawing.php.
351 if ($this->_resizeProportional && $pValue != 0) {
352 $ratio = $this->_width / ($this->_height != 0 ? $this->_height : 1);
353 $this->_width = round($ratio * $pValue);
357 $this->_height = $pValue;
◆ setName()
PHPExcel_Worksheet_BaseDrawing::setName |
( |
|
$pValue = '' | ) |
|
◆ setOffsetX()
PHPExcel_Worksheet_BaseDrawing::setOffsetX |
( |
|
$pValue = 0 | ) |
|
◆ setOffsetY()
PHPExcel_Worksheet_BaseDrawing::setOffsetY |
( |
|
$pValue = 0 | ) |
|
◆ setResizeProportional()
PHPExcel_Worksheet_BaseDrawing::setResizeProportional |
( |
|
$pValue = true | ) |
|
◆ setRotation()
PHPExcel_Worksheet_BaseDrawing::setRotation |
( |
|
$pValue = 0 | ) |
|
◆ setShadow()
◆ setWidth()
PHPExcel_Worksheet_BaseDrawing::setWidth |
( |
|
$pValue = 0 | ) |
|
Set Width.
- Parameters
-
- Returns
- PHPExcel_Worksheet_BaseDrawing
Definition at line 321 of file BaseDrawing.php.
323 if ($this->_resizeProportional && $pValue != 0) {
324 $ratio = $this->_height / ($this->_width != 0 ? $this->_width : 1);
325 $this->_height = round($ratio * $pValue);
329 $this->_width = $pValue;
◆ setWidthAndHeight()
PHPExcel_Worksheet_BaseDrawing::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
-
- Returns
- PHPExcel_Worksheet_BaseDrawing
Definition at line 375 of file BaseDrawing.php.
376 $xratio = $width / ($this->_width != 0 ? $this->_width : 1);
377 $yratio = $height / ($this->_height != 0 ? $this->_height : 1);
378 if ($this->_resizeProportional && !($width == 0 || $height == 0)) {
379 if (($xratio * $this->_height) < $height) {
380 $this->_height = ceil($xratio * $this->_height);
381 $this->_width = $width;
383 $this->_width = ceil($yratio * $this->_width);
384 $this->_height = $height;
387 $this->_width = $width;
388 $this->_height = $height;
◆ setWorksheet()
PHPExcel_Worksheet_BaseDrawing::setWorksheet |
( |
PHPExcel_Worksheet |
$pValue = null , |
|
|
|
$pOverrideOld = false |
|
) |
| |
Set Worksheet.
- Parameters
-
PHPExcel_Worksheet | $pValue | |
bool | $pOverrideOld | If a Worksheet has already been assigned, overwrite it and remove image from old Worksheet? |
- Exceptions
-
- Returns
- PHPExcel_Worksheet_BaseDrawing
Definition at line 218 of file BaseDrawing.php.
References getHashCode().
219 if (is_null($this->_worksheet)) {
221 $this->_worksheet = $pValue;
222 $this->_worksheet->
getCell($this->_coordinates);
223 $this->_worksheet->getDrawingCollection()->append($this);
227 $iterator = $this->_worksheet->getDrawingCollection()->getIterator();
229 while ($iterator->valid()) {
230 if ($iterator->current()->getHashCode() == $this->
getHashCode()) {
231 $this->_worksheet->getDrawingCollection()->offsetUnset( $iterator->key() );
232 $this->_worksheet = null;
240 throw new PHPExcel_Exception(
"A PHPExcel_Worksheet has already been assigned. Drawings can only exist on one PHPExcel_Worksheet.");
getCell($pCoordinate='A1')
Get cell at a specific coordinate.
getHashCode()
Get hash code.
setWorksheet(PHPExcel_Worksheet $pValue=null, $pOverrideOld=false)
Set Worksheet.
◆ $_coordinates
PHPExcel_Worksheet_BaseDrawing::$_coordinates |
|
protected |
◆ $_description
PHPExcel_Worksheet_BaseDrawing::$_description |
|
protected |
◆ $_height
PHPExcel_Worksheet_BaseDrawing::$_height |
|
protected |
◆ $_imageCounter
PHPExcel_Worksheet_BaseDrawing::$_imageCounter = 0 |
|
staticprivate |
◆ $_imageIndex
PHPExcel_Worksheet_BaseDrawing::$_imageIndex = 0 |
|
private |
◆ $_name
PHPExcel_Worksheet_BaseDrawing::$_name |
|
protected |
◆ $_offsetX
PHPExcel_Worksheet_BaseDrawing::$_offsetX |
|
protected |
◆ $_offsetY
PHPExcel_Worksheet_BaseDrawing::$_offsetY |
|
protected |
◆ $_resizeProportional
PHPExcel_Worksheet_BaseDrawing::$_resizeProportional |
|
protected |
◆ $_rotation
PHPExcel_Worksheet_BaseDrawing::$_rotation |
|
protected |
◆ $_shadow
PHPExcel_Worksheet_BaseDrawing::$_shadow |
|
protected |
◆ $_width
PHPExcel_Worksheet_BaseDrawing::$_width |
|
protected |
◆ $_worksheet
PHPExcel_Worksheet_BaseDrawing::$_worksheet |
|
protected |
The documentation for this class was generated from the following file:
- libs/composer/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/BaseDrawing.php