Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

13 lines (10 sloc) 0.324 kb
<?php
$sur = new CairoImageSurface(CairoFormat::ARGB32, 10, 10);
$con = new CairoContext($sur);
$pat = new CairoLinearGradient(0, -10, 0, 10);
$pat->addColorStopRgba(0,1,0,0,1);
$pat->addColorStopRgba(1,0,0,1,0.5);
$con->setSource($pat);
$con->paint();
$sur->writeToPng(dirname(__FILE__) . "/gradient-alpha-php.png");
?>
Jump to Line
Something went wrong with that request. Please try again.