Typo ;)
[phpCairo.git] / testcases / phpCairo / linear-gradient-reflect.php
blobcd52b90c4af0b402e1770c9100970167f7781cd3
1 <?
2 $width = 50;
3 $height = 50;
4 $sur = new CairoImageSurface(FORMAT_ARGB32, $width, $height);
5 $con = new CairoContext($sur);
7 $con->set_source_rgb ( 0.5, 0.5, 0.5);
8 $con->paint ();
9 $con->save ();
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);
16 $con->fill ();
17 $con->restore ();
19 $sur->write_to_png("linear-gradient-reflect-php.png");