/** * @param string $text * @param string $font = self::DEFAULT_FONT * @param int $size = self::DEFAULT_SIZE * @param GDPosition $position * @param GDColor $color */ public function __construct($text = '', $font = self::DEFAULT_FONT, $size = self::DEFAULT_SIZE, GDPosition $position = null, GDColor $color = null) { $this->_text = $text; $this->_font = $font; $this->_size = $size; $this->_position = $position ? $position : new GDPosition(0, $size); $this->_color = $color ? $color : GDColor::FromHEX(GDColor::BLACK); }