Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (12 sloc) 348 Bytes
<?php
$sur = new CairoImageSurface(CairoFormat::ARGB32, 2, 2);
$con = new CairoContext($sur);
$pat = new CairoLinearGradient(0,0,1,1);
$con->setSource($pat);
$con->paint();
unset($pat);
$pat = new CairoRadialGradient(0,0,0,1,1,1);
$con->setSource($pat);
$con->paint();
$sur->writeToPng(dirname(__FILE__) . "/gradient-zero-stops-php.png");
?>