2 $sur = new CairoImageSurface(FORMAT_ARGB32
, 25*60, 4*60);
3 $con = new CairoContext($sur);
5 $dash = array(20.0,20.0);
7 $con->set_source_rgb(0, 0, 0);
12 for($c=0; $c<5; $c++
) {
14 $con->move_to((($b*5)+
$c)*60 +
10, $a*60 +
10);
15 $con->rel_curve_to(0, $b*10, 0, $b*10, $c*10, $b*10);
16 $con->set_source_rgb(1,1,1);
17 $con->set_line_width(8);
18 $con->set_line_cap(LINE_CAP_ROUND
);
19 $con->set_dash($dash, 2, $a*10);
20 $con->stroke_preserve();
21 $con->set_source_rgb(0,0.5,1);
23 //$con->set_source_rgb(1,1,1);
24 $con->set_line_width(2);
25 $con->set_line_cap(2);
27 $con->set_dash($ar,2,0);
31 $sur->write_to_png("dash-curve-php.png");