Changed the entire file structure to remove the .c includes from cairo.c
[phpCairo.git] / testcases / phpCairo / dash-curve.php
blobf5068f7557b5f4cff2bf5fc9631b90865d2afa4b
1 <?
2 $sur = new CairoImageSurface(FORMAT_ARGB32, 25*60, 4*60);
3 $con = new CairoContext($sur);
4 //$con->save();
5 $dash = array(20.0,20.0);
7 $con->setSourceRgb(0, 0, 0);
8 $con->paint();
10 for($a=0; $a<4; $a++)
11 for($b=0; $b<5; $b++)
12 for($c=0; $c<5; $c++) {
14 $con->moveTo((($b*5)+$c)*60 + 10, $a*60 + 10);
15 $con->relCurveTo(0, $b*10, 0, $b*10, $c*10, $b*10);
16 $con->setSourceRgb(1,1,1);
17 $con->setLineWidth(8);
18 $con->setLineCap(LINE_CAP_ROUND);
19 $con->setDash($dash, 2, $a*10);
20 $con->strokePreserve();
21 $con->setSourceRgb(0,0.5,1);
22 $con->setLineWidth(2);
23 $con->setLineCap(2);
24 $ar = array(8.0,8.0);
25 $con->setDash($ar,2,0);
26 $con->stroke();
29 $sur->writeToPng("dash-curve-php.png");