4 $sur = new CairoImageSurface(FORMAT_ARGB32
, $width, $height);
5 $con = new CairoContext($sur);
7 $con->setSourceRgb ( 0.5, 0.5, 0.5);
10 $pattern = new CairoLinearGradient(0, 0, 10.0, 0);
11 $pattern->addColorStopRgb ( 0.0, 0.0, 0.0, 1.0);
12 $pattern->addColorStopRgb ( 1.0,1.0, 0.0, 0.0);
13 $pattern->setExtend (EXTEND_REFLECT
);
14 $con->setSource ($pattern);
15 $con->rectangle ( 0.0, 0.0, $width, $height);
19 $sur->writeToPng("linear-gradient-reflect-php.png");