Added some test cases ....
[phpCairo.git] / testcases / phpCairo / clip-push-group.php
blob5689e783c80fd81f55a80060736fbbd055ac7a35
1 <?
2 $size = 10;
3 $pad = 2;
5 $sur = new CairoImageSurface(FORMAT_ARGB32, $size, $size);
6 $con = new CairoContext($sur);
8 $con->set_source_rgb(1,0,0);
9 $con->paint();
11 $con->arc($size/2, $size/2, $size/2 - $pad, 0, 2*M_PI);
12 $con->clip();
13 $con->push_group();
14 $con->set_source_rgb(0,0,1);
15 $con->paint();
16 $con->pop_group_to_source();
17 $con->paint();
19 $sur->write_to_png("clip-push-group-php.png");