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ܟFUV+1.xEBKyjsO+y;CiY!ȽbEeU/iLh >`OͼѺB+ZT!(Wd (#\(@E!fQP)p};YX|LeL44VJ&}}3_6xE\gY"X`q[Toe g\W^h~Hll̘IJ66<0=|KljP߷6Q>s jiCI |NNTNKi8Զ\i_iju`@"gAnd1e❿ ?D8:G9<2UJ3Iz2E;pQ)>6<(Of7/wWdmI_ad%;=G޼SnR|䣽=s&/I }Χ͘HzX9Udx)^y my]B;valid()) { $this->marginTop = (string) $margin; } return $this; } /** * Is the comment visible by default? */ public function getVisible(): bool { return $this->visible; } /** * Set comment default visibility. */ public function setVisible(bool $visibility): self { $this->visible = $visibility; return $this; } /** * Set fill color. */ public function setFillColor(Color $color): self { $this->fillColor = $color; return $this; } /** * Get fill color. */ public function getFillColor(): Color { return $this->fillColor; } /** * Set Alignment. */ public function setAlignment(string $alignment): self { $this->alignment = $alignment; return $this; } /** * Get Alignment. */ public function getAlignment(): string { return $this->alignment; } /** * Get hash code. */ public function getHashCode(): string { return md5( $this->author . $this->text->getHashCode() . $this->width . $this->height . $this->marginLeft . $this->marginTop . ($this->visible ? 1 : 0) . $this->fillColor->getHashCode() . $this->alignment . ($this->hasBackgroundImage() ? $this->backgroundImage->getHashCode() : '') . __CLASS__ ); } /** * Implement PHP __clone to create a deep clone, not just a shallow copy. */ public function __clone() { $vars = get_object_vars($this); foreach ($vars as $key => $value) { if (is_object($value)) { $this->$key = clone $value; } else { $this->$key = $value; } } } /** * Convert to string. */ public function __toString(): string { return $this->text->getPlainText(); } /** * Check is background image exists. */ public function hasBackgroundImage(): bool { $path = $this->backgroundImage->getPath(); if (empty($path)) { return false; } return getimagesize($path) !== false; } /** * Returns background image. */ public function getBackgroundImage(): Drawing { return $this->backgroundImage; } /** * Sets background image. */ public function setBackgroundImage(Drawing $objDrawing): self { if (!array_key_exists($objDrawing->getType(), Drawing::IMAGE_TYPES_CONVERTION_MAP)) { throw new PhpSpreadsheetException('Unsupported image type in comment background. Supported types: PNG, JPEG, BMP, GIF.'); } $this->backgroundImage = $objDrawing; return $this; } /** * Sets size of comment as size of background image. */ public function setSizeAsBackgroundImage(): self { if ($this->hasBackgroundImage()) { $this->setWidth(SharedDrawing::pixelsToPoints($this->backgroundImage->getWidth()) . 'pt'); $this->setHeight(SharedDrawing::pixelsToPoints($this->backgroundImage->getHeight()) . 'pt'); } return $this; } }