4 $sur = new CairoImageSurface(FORMAT_ARGB32
, $width, $height);
5 $con = new CairoContext($sur);
7 $con->arc($width/2, $height/2, $width/3, 0, 2 * M_PI
);
11 $con->lineTo($width/4, $height/2);
12 $con->lineTo(0, $height);
13 $con->lineTo($width, $height);
14 $con->lineTo(3*$width/4, $height/2);
15 $con->lineTo($width, 0);
18 $con->setSourceRgb(0,0,0.6);
21 $con->lineTo(0, $height);
22 $con->lineTo($width/2, 3*$height/4);
23 $con->lineTo($width, $height);
24 $con->lineTo($width, 0);
25 $con->lineTo($width/2, $height/4);
29 $con->arc($width/2, $height/2, $width/5, 0, 2 * M_PI
);
31 $con->setSourceRgb(1,1,0);
35 $sur->writeToPng("clip-twice-php.png");