Changed the entire file structure to remove the .c includes from cairo.c
[phpCairo.git] / testcases / phpCairo / close-path.php
blobb65f341f9f1a79fe3aa719c17b8e91c7dc0cc6eb
1 <?
2 $sur = new CairoImageSurface(FORMAT_ARGB32, 32, 16);
3 $con = new CairoContext($sur);
5 $con->save();
6 $con->setSourceRgb(1,1,1);
7 $con->paint();
8 $con->restore();
10 $con->arc(8, 8, 4, 0, M_PI);
11 $con->closePath();
12 $con->arc(8,8,4,M_PI,2*M_PI);
13 $con->fill();
15 $con->translate(16,0);
16 $con->moveTo(8,4);
17 $con->arcNegative(8,8,4,3*M_PI/2,M_PI/2);
18 $con->closePath();
19 $con->curveTo(12,4,12,12,8,12);
21 $path = $con->copyPathFlat();
22 $con->newPath();
23 $con->appendPath($path);
24 $con->fill();
26 $sur->writeToPng("close-path-php.png");