Simple example of usage Canvas
element.
use function Thermage\canvas;
use function Thermage\render;
// ...
$canvas = canvas();
for ($i=0; $i < 16; $i++) {
// Cross
$canvas->pixel($i, $i, 'white');
$canvas->pixel(16 - $i - 1, $i, 'white');
// Border
$canvas->pixel($i, 0, 'red');
$canvas->pixel(0, $i, 'green');
$canvas->pixel($i, 16 - 1, 'blue');
$canvas->pixel(16 - 1, $i, 'yellow');
}
render(
$canvas
);
Terminal
$ php thermage.php