Changed the entire file structure to remove the .c includes from cairo.c
[phpCairo.git] / testcases / phpCairo / degenerate-arc.php
blob56dc81ba915eef6c212a47208d6161bb8b57e114
1 <?
2 $sur = new CairoImageSurface(FORMAT_ARGB32, 40, 40);
3 $con = new CairoContext($sur);
5 $con->setSourceRgb(1,1,1);
6 $con->paint();
7 $con->setLineCap(LINE_CAP_ROUND);
8 $con->setLineWidth(5);
10 $con->setSourceRgb(0,1,0);
12 for($n=0;$n<8;$n++) {
13 $theta = $n * 2 * M_PI / 8;
14 $con->newSubPath();
15 $con->arc(20, 20, 15, $theta, $theta);
16 $con->closePath();
19 $con->stroke();
21 $con->setLineWidth(2);
22 $con->setSourceRgb(0,0,1);
24 for($n=0;$n<8;$n++) {
25 $theta = $n * 2 * M_PI / 8;
26 $con->moveTo(20,20);
27 $con->arc(20,20,15, $theta, $theta);
28 $con->closePath();
31 $con->stroke();
32 $con->setSourceRgb(1,0,0);
33 $con->arc(20,20,2,0,2*M_PI);
34 $con->fill();
36 $sur->writeToPng("degenerate-arc-php.png");