setText($text); $this->setFont($font); // Set default color to black if($color === NULL) { $color = new awColor(0, 0, 0); } $this->setColor($color); $this->setAngle($angle); $this->border = new awBorder; $this->border->hide(); } /** * Get text * * @return string */ function getText() { return $this->text; } /** * Change text * * @param string $text New text */ function setText($text) { $this->text = (string)$text; } /** * Change text font * * @param Font */ function setFont(&$font) { $this->font = $font; } /** * Get text font * * @return int */ function getFont() { return $this->font; } /** * Change text angle * * @param int */ function setAngle($angle) { $this->angle = (int)$angle; } /** * Get text angle * * @return int */ function getAngle() { return $this->angle; } /** * Change text color * * @param Color */ function setColor($color) { $this->color = $color; } /** * Get text color * * @return Color */ function getColor() { return $this->color; } /** * Change text background color * * @param $color */ function setBackgroundColor($color) { $this->background = $color; } /** * Change text background gradient * * @param $gradient */ function setBackgroundGradient($gradient) { $this->background = $gradient; } /** * Get text background * * @return Color, Gradient */ function getBackground() { return $this->background; } /** * Change padding * * @param int $left Left padding * @param int $right Right padding * @param int $top Top padding * @param int $bottom Bottom padding */ function setPadding($left, $right, $top, $bottom) { $this->padding = array((int)$left, (int)$right, (int)$top, (int)$bottom); } /** * Get current padding * * @return array */ function getPadding() { return $this->padding; } } registerClass('Text'); ?>