2 $sur = new CairoImageSurface(FORMAT_ARGB32
, 25*60, 4*60);
3 $con = new CairoContext($sur);
5 $dash = array(20.0,20.0);
7 $con->setSourceRgb(0, 0, 0);
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);
25 $con->setDash($ar,2,0);
29 $sur->writeToPng("dash-curve-php.png");