fillType = self::FILL_NONE; $this->rotation = (double)0; $this->startColor = new Color(Color::COLOR_WHITE); $this->endColor = new Color(Color::COLOR_BLACK); } /** * Get Fill Type * * @return string */ public function getFillType() { return $this->fillType; } /** * Set Fill Type * * @param string $pValue \PhpOffice\PhpPresentation\Style\Fill fill type * @return \PhpOffice\PhpPresentation\Style\Fill */ public function setFillType($pValue = self::FILL_NONE) { $this->fillType = $pValue; return $this; } /** * Get Rotation * * @return double */ public function getRotation() { return $this->rotation; } /** * Set Rotation * * @param float|int $pValue * @return \PhpOffice\PhpPresentation\Style\Fill */ public function setRotation($pValue = 0) { $this->rotation = (double)$pValue; return $this; } /** * Get Start Color * * @return \PhpOffice\PhpPresentation\Style\Color */ public function getStartColor() { // It's a get but it may lead to a modified color which we won't detect but in which case we must bind. // So bind as an assurance. return $this->startColor; } /** * Set Start Color * * @param \PhpOffice\PhpPresentation\Style\Color $pValue * @throws \Exception * @return \PhpOffice\PhpPresentation\Style\Fill */ public function setStartColor(Color $pValue = null) { $this->startColor = $pValue; return $this; } /** * Get End Color * * @return \PhpOffice\PhpPresentation\Style\Color */ public function getEndColor() { // It's a get but it may lead to a modified color which we won't detect but in which case we must bind. // So bind as an assurance. return $this->endColor; } /** * Set End Color * * @param \PhpOffice\PhpPresentation\Style\Color $pValue * @throws \Exception * @return \PhpOffice\PhpPresentation\Style\Fill */ public function setEndColor(Color $pValue = null) { $this->endColor = $pValue; return $this; } /** * Get hash code * * @return string Hash code */ public function getHashCode() { return md5( $this->getFillType() . $this->getRotation() . $this->getStartColor()->getHashCode() . $this->getEndColor()->getHashCode() . __CLASS__ ); } /** * Get hash index * * Note that this index may vary during script execution! Only reliable moment is * while doing a write of a workbook and when changes are not allowed. * * @return string Hash index */ public function getHashIndex() { return $this->hashIndex; } /** * Set hash index * * Note that this index may vary during script execution! Only reliable moment is * while doing a write of a workbook and when changes are not allowed. * * @param string $value Hash index */ public function setHashIndex($value) { $this->hashIndex = $value; } }