3 $sur = new CairoImageSurface(FORMAT_ARGB32
, $starsize * 2 +
2, $starsize+
2);
4 $con = new CairoContext($sur);
5 $con->setSourceRgb(1,0,0);
11 $con->relLineTo ( 6, 20);
12 $con->relLineTo ( -16, -12);
13 $con->relLineTo ( 20, 0);
14 $con->relLineTo ( -16, 12);
16 $con->setFillRule (FILL_RULE_WINDING
);
21 $con->translate ($starsize +
1, 0);
25 $con->relLineTo ( 6, 20);
26 $con->relLineTo ( -16, -12);
27 $con->relLineTo ( 20, 0);
28 $con->relLineTo ( -16, 12);
30 $con->setFillRule (FILL_RULE_EVEN_ODD
);
35 $sur->writeToPng("clip-fill-rule-php.png");