Changed the entire file structure to remove the .c includes from cairo.c
[phpCairo.git] / testcases / phpCairo / linear-gradient-reflect.php
blob5939144a4594abeb9b0429ad318c07bf953fbf79
1 <?
2 $width = 50;
3 $height = 50;
4 $sur = new CairoImageSurface(FORMAT_ARGB32, $width, $height);
5 $con = new CairoContext($sur);
7 $con->setSourceRgb ( 0.5, 0.5, 0.5);
8 $con->paint ();
9 $con->save ();
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);
16 $con->fill ();
17 $con->restore ();
19 $sur->writeToPng("linear-gradient-reflect-php.png");