PhpOffice\PhpPresentation\Shape\Line::__construct PHP Method

__construct() public method

Create a new \PhpOffice\PhpPresentation\Shape\Line instance
public __construct ( integer $fromX, integer $fromY, integer $toX, integer $toY )
$fromX integer
$fromY integer
$toX integer
$toY integer
    public function __construct($fromX, $fromY, $toX, $toY)
    {
        parent::__construct();
        $this->getBorder()->setLineStyle(Border::LINE_SINGLE);
        $this->setOffsetX($fromX);
        $this->setOffsetY($fromY);
        $this->setWidth($toX - $fromX);
        $this->setHeight($toY - $fromY);
    }