2 $sur = new CairoImageSurface(FORMAT_ARGB32
, 32, 16);
3 $con = new CairoContext($sur);
6 $con->setSourceRgb(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->arcNegative(8,8,4,3*M_PI
/2,M_PI
/2);
19 $con->curveTo(12,4,12,12,8,12);
21 $path = $con->copyPathFlat();
23 $con->appendPath($path);
26 $sur->writeToPng("close-path-php.png");