136 $this->_description =
'';
137 $this->_worksheet = null;
138 $this->_coordinates =
'A1';
143 $this->_resizeProportional =
true;
144 $this->_rotation = 0;
148 self::$_imageCounter++;
177 $this->_name = $pValue;
197 $this->_description = $pValue;
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 Exception(
"A PHPExcel_Worksheet has already been assigned. Drawings can only exist on one PHPExcel_Worksheet.");
262 $this->_coordinates = $pValue;
282 $this->_offsetX = $pValue;
302 $this->_offsetY = $pValue;
323 if ($this->_resizeProportional && $pValue != 0) {
325 $this->_height = round($ratio * $pValue);
329 $this->_width = $pValue;
351 if ($this->_resizeProportional && $pValue != 0) {
353 $this->_width = round($ratio * $pValue);
357 $this->_height = $pValue;
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;
406 $this->_resizeProportional = $pValue;
426 $this->_rotation = $pValue;
447 $this->_shadow = $pValue;
459 . $this->_description
460 . $this->_worksheet->getHashCode()
461 . $this->_coordinates
467 . $this->_shadow->getHashCode()
476 $vars = get_object_vars($this);
477 foreach ($vars as $key => $value) {
478 if (is_object($value)) {
479 $this->$key = clone $value;
481 $this->$key = $value;