2 function little_star_path()
7 $con->relLineTo(-16,-12);
9 $con->relLineTo(-16,12);
12 function big_star_path()
16 $con->relLineTo(25,80);
17 $con->relLineTo(-65,-50);
18 $con->relLineTo(80,0);
19 $con->relLineTo(-65,50);
23 $sur = new CairoImageSurface(FORMAT_ARGB32
, 163, 103);
24 $con = new CairoContext($sur);
25 $con->setSourceRgb(1,0,0);
28 $con->setFillRule(FILL_RULE_WINDING
);
30 $con->translate(21,0);
32 $con->setFillRule(FILL_RULE_EVEN_ODD
);
34 $con->translate(-21, 21);
36 $con->setFillRule(FILL_RULE_WINDING
);
38 $con->translate(81,0);
40 $con->setFillRule(FILL_RULE_EVEN_ODD
);
42 $sur->writeToPng("fill-rule-php.png");