Examples updated to the latest Camel Case .. Was a pain converting them
[phpCairo.git] / testcases / phpCairo / clip-empty.php
blobc49515670cff844d5ab442e8851b0bb4a5d385a3
1 <?
2 $sur = new CairoImageSurface(FORMAT_ARGB32, 10, 10);
3 $con = new CairoContext($sur);
4 $con->setSourceRgb(0,0,1);
5 $con->paint();
7 $con->resetClip();
8 //$con->rectangle(2,2,2,2);
9 $con->clip();
10 //$con->rectangle(6,6,2,2);
11 //$con->clip();
13 $con->translate(0.5,0.5);
15 $con->setSourceRgb(0,1,0);
16 //$con->reset_clip();
17 $con->rectangle(0,0,10,10);
18 //$con->clip();
19 //$con->rectangle(6,6,6,6);
20 //$con->clip();
21 $con->fillPreserve();
22 //$con->rectangle(0,0,10,10);
23 $con->setSourceRgb(1,0,0);
24 //$con->fill();
25 $con->stroke();
26 $con->selectFontFace("Bitstream Vera Sans", FONT_SLANT_NORMAL, FONT_WEIGHT_NORMAL);
27 $con->moveTo(0,10);
28 $con->showText("cairo");
29 $sur->writeToPng("clip-empty-php.png");