diff --git a/src/Typography/Line.php b/src/Typography/Line.php index 67e38571..f4c05a01 100644 --- a/src/Typography/Line.php +++ b/src/Typography/Line.php @@ -3,21 +3,29 @@ namespace Intervention\Image\Typography; use Intervention\Image\Interfaces\FontInterface; +use Intervention\Image\Geometry\Point; class Line { + protected $position; + public function __construct(protected string $text) { - // + $this->position = new Point(); } - public function __toString(): string + public function getPosition(): Point { - return $this->text; + return $this->position; } public function width(FontInterface $font): int { return $font->getBoxSize($this->text)->width(); } + + public function __toString(): string + { + return $this->text; + } }