2 $sur = new CairoImageSurface(FORMAT_ARGB32
, 32, 16);
3 $con = new CairoContext($sur);
6 $con->set_source_rgb(1,1,1);
10 $con->arc(8, 8, 4, 0, M_PI
);
12 $con->arc(8,8,4,M_PI
,2*M_PI
);
15 $con->translate(16,0);
17 $con->arc_negative(8,8,4,3*M_PI
/2,M_PI
/2);
19 $con->curve_to(12,4,12,12,8,12);
21 $path = $con->copy_path_flat();
23 $con->append_path($path);
26 $sur->write_to_png("close-path-php.png");