1. Go to this page and download the library: Download atelier/layout library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Atelier\Layout\Alignment;
use Atelier\Layout\Element\TextBlock;
use Atelier\Layout\Geometry\Rect;
use Atelier\Layout\LayoutContext;
$text = TextBlock::of('caption', 'A label that wraps', 12)
->align(Alignment::Center, Alignment::End)
->layout(new LayoutContext(), new Rect(0, 0, 90, 48));
$text->lines; // one frame and one baseline per line
$text->hasOverflow(); // reported, never hidden
use Atelier\Layout\Connection\OrthogonalConnector;
$connection = (new OrthogonalConnector())->connect($from, $to);
$connection->points; // 100,40 -> 140,40 -> 140,80 -> 180,80
$connection->labelPoint; // where an edge label belongs
$connection->tipTangent; // the final direction, for an arrowhead
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.