setStyleByArray($style); } /** * @since 0.13.0 * * @return string */ public function getAlignment() { return $this->alignment; } /** * @since 0.13.0 * * @param string $value * * @return self */ public function setAlignment($value) { if (Jc::isValid($value)) { $this->alignment = $value; } return $this; } /** * Get unit. * * @return string */ public function getUnit() { return $this->unit; } /** * Set unit. * * @param string $value * * @return self */ public function setUnit($value) { $this->unit = $value; return $this; } /** * Get width. * * @return float|int */ public function getWidth() { return $this->width; } /** * Set width. * * @param float|int $value * * @return self */ public function setWidth($value = null) { $this->width = $this->setNumericVal($value, null); return $this; } /** * Get height. * * @return float|int */ public function getHeight() { return $this->height; } /** * Set height. * * @param float|int $value * * @return self */ public function setHeight($value = null) { $this->height = $this->setNumericVal($value, null); return $this; } /** * Get left. * * @return float|int */ public function getLeft() { return $this->left; } /** * Set left. * * @param float|int $value * * @return self */ public function setLeft($value = 0) { $this->left = $this->setNumericVal($value, 0); return $this; } /** * Get topmost position. * * @return float|int */ public function getTop() { return $this->top; } /** * Set topmost position. * * @param float|int $value * * @return self */ public function setTop($value = 0) { $this->top = $this->setNumericVal($value, 0); return $this; } /** * Get position type. * * @return string */ public function getPos() { return $this->pos; } /** * Set position type. * * @param string $value * * @return self */ public function setPos($value) { $enum = [ self::POS_ABSOLUTE, self::POS_RELATIVE, ]; $this->pos = $this->setEnumVal($value, $enum, $this->pos); return $this; } /** * Get horizontal position. * * @return string */ public function getHPos() { return $this->hPos; } /** * Set horizontal position. * * @since 0.12.0 "absolute" option is available. * * @param string $value * * @return self */ public function setHPos($value) { $enum = [ self::POS_ABSOLUTE, self::POS_LEFT, self::POS_CENTER, self::POS_RIGHT, self::POS_INSIDE, self::POS_OUTSIDE, ]; $this->hPos = $this->setEnumVal($value, $enum, $this->hPos); return $this; } /** * Get vertical position. * * @return string */ public function getVPos() { return $this->vPos; } /** * Set vertical position. * * @since 0.12.0 "absolute" option is available. * * @param string $value * * @return self */ public function setVPos($value) { $enum = [ self::POS_ABSOLUTE, self::POS_TOP, self::POS_CENTER, self::POS_BOTTOM, self::POS_INSIDE, self::POS_OUTSIDE, ]; $this->vPos = $this->setEnumVal($value, $enum, $this->vPos); return $this; } /** * Get horizontal position relative to. * * @return string */ public function getHPosRelTo() { return $this->hPosRelTo; } /** * Set horizontal position relative to. * * @param string $value * * @return self */ public function setHPosRelTo($value) { $enum = [ self::POS_RELTO_MARGIN, self::POS_RELTO_PAGE, self::POS_RELTO_COLUMN, self::POS_RELTO_CHAR, self::POS_RELTO_LMARGIN, self::POS_RELTO_RMARGIN, self::POS_RELTO_IMARGIN, self::POS_RELTO_OMARGIN, ]; $this->hPosRelTo = $this->setEnumVal($value, $enum, $this->hPosRelTo); return $this; } /** * Get vertical position relative to. * * @return string */ public function getVPosRelTo() { return $this->vPosRelTo; } /** * Set vertical position relative to. * * @param string $value * * @return self */ public function setVPosRelTo($value) { $enum = [ self::POS_RELTO_MARGIN, self::POS_RELTO_PAGE, self::POS_RELTO_TEXT, self::POS_RELTO_LINE, self::POS_RELTO_TMARGIN, self::POS_RELTO_BMARGIN, self::POS_RELTO_IMARGIN, self::POS_RELTO_OMARGIN, ]; $this->vPosRelTo = $this->setEnumVal($value, $enum, $this->vPosRelTo); return $this; } /** * Get wrap type. * * @return string */ public function getWrap() { return $this->wrap; } /** * Set wrap type. * * @param string $value * * @return self */ public function setWrap($value) { $enum = [ self::WRAP_INLINE, self::WRAP_SQUARE, self::WRAP_TIGHT, self::WRAP_THROUGH, self::WRAP_TOPBOTTOM, self::WRAP_BEHIND, self::WRAP_INFRONT, ]; $this->wrap = $this->setEnumVal($value, $enum, $this->wrap); return $this; } /** * Get top distance from text wrap. * * @return float */ public function getWrapDistanceTop() { return $this->wrapDistanceTop; } /** * Set top distance from text wrap. * * @param int $value * * @return self */ public function setWrapDistanceTop($value = null) { $this->wrapDistanceTop = $this->setFloatVal($value, null); return $this; } /** * Get bottom distance from text wrap. * * @return float */ public function getWrapDistanceBottom() { return $this->wrapDistanceBottom; } /** * Set bottom distance from text wrap. * * @param float $value * * @return self */ public function setWrapDistanceBottom($value = null) { $this->wrapDistanceBottom = $this->setFloatVal($value, null); return $this; } /** * Get left distance from text wrap. * * @return float */ public function getWrapDistanceLeft() { return $this->wrapDistanceLeft; } /** * Set left distance from text wrap. * * @param float $value * * @return self */ public function setWrapDistanceLeft($value = null) { $this->wrapDistanceLeft = $this->setFloatVal($value, null); return $this; } /** * Get right distance from text wrap. * * @return float */ public function getWrapDistanceRight() { return $this->wrapDistanceRight; } /** * Set right distance from text wrap. * * @param float $value * * @return self */ public function setWrapDistanceRight($value = null) { $this->wrapDistanceRight = $this->setFloatVal($value, null); return $this; } /** * Get position. * * @return int */ public function getPosition() { return $this->position; } /** * Set position. * * @param int $value * * @return self */ public function setPosition($value = null) { $this->position = $this->setIntVal($value, null); return $this; } }