Added some test cases ....
[phpCairo.git] / testcases / phpCairo / close-path.php
blob4888ad7410bc1cef92566d3ee786bc91402385e3
1 <?
2 $sur = new CairoImageSurface(FORMAT_ARGB32, 32, 16);
3 $con = new CairoContext($sur);
5 $con->save();
6 $con->set_source_rgb(1,1,1);
7 $con->paint();
8 $con->restore();
10 $con->arc(8, 8, 4, 0, M_PI);
11 $con->close_path();
12 $con->arc(8,8,4,M_PI,2*M_PI);
13 $con->fill();
15 $con->translate(16,0);
16 $con->move_to(8,4);
17 $con->arc_negative(8,8,4,3*M_PI/2,M_PI/2);
18 $con->close_path();
19 $con->curve_to(12,4,12,12,8,12);
21 $path = $con->copy_path_flat();
22 $con->new_path();
23 $con->append_path($path);
24 $con->fill();
26 $sur->write_to_png("close-path-php.png");