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