4 $width = $cisize*6.5 +
$pad;
5 $height = $cisize*3.5 +
$pad;
7 function draw_circle($x, $y)
11 $con->translate($x,$y);
12 $con->arc(0,0,$cisize / 2,0,2*M_PI
);
17 function draw_circles()
20 draw_circle(0, $cisize*-0.1);
21 draw_circle($cisize*0.4, $cisize*0.25);
22 draw_circle($cisize*2,0);
23 draw_circle($cisize*4,0);
24 draw_circle($cisize*6,0);
27 $sur = new CairoImageSurface(FORMAT_ARGB32
, $width, $height);
28 $con = new CairoContext($sur);
30 $con->translate($pad, $pad);
31 $con->setSourceRgb(0,1,0);
32 $con->setOperator(OPERATOR_OVER
);
33 draw_circle($cisize*0.5, $cisize*1.5);
34 $con->setSourceRgb(1,0,0);
35 $con->setOperator(OPERATOR_ADD
);
36 draw_circle($cisize*0.75, $cisize*1.75);
37 $con->setSourceRgb(0,1,0);
38 $con->setOperator(OPERATOR_OVER
);
39 $con->translate($cisize*2.5, $cisize*0.6);
41 $con->setSourceRgb(1,0,0);
42 $con->setOperator(OPERATOR_ADD
);
43 $con->translate(0, $cisize*2);
46 $sur->writeToPng("finer-grained-fallbacks-php.png");