Changed the entire file structure to remove the .c includes from cairo.c
[phpCairo.git] / testcases / phpCairo / clip-all.php
blobbbe0b39829e33e8e5b21fdac38273b167a23eb29
1 <?
2 $sur = new CairoImageSurface(FORMAT_ARGB32, 10, 10);
3 $con = new CairoContext($sur);
4 $con->rectangle(0,0,10,10);
5 $con->setSourceRgb(0,0,1);
6 $con->fill();
8 $con->resetClip();
9 $con->rectangle(2,2,2,2);
10 $con->clip();
11 $con->rectangle(6,6,2,2);
12 $con->clip();
14 $con->translate(0.5,0.5);
16 $con->resetClip();
17 $con->rectangle(2,2,2,2);
18 $con->clip();
19 $con->rectangle(6,6,6,6);
20 $con->clip();
22 $con->rectangle(0,0,10,10);
23 $con->setSourceRgb(1,1,0);
24 $con->fill();
25 $con->selectFontFace("Bitstream Vera Sans", FONT_SLANT_NORMAL, FONT_WEIGHT_NORMAL);
26 $con->moveTo(0,10);
27 $con->showText("cairo");
28 $sur->writeToPng("clip-all-php.png");