Examples updated to the latest Camel Case .. Was a pain converting them
[phpCairo.git] / testcases / phpCairo / get-group-target.php
blob9aefc5b9f23983c6f8ef7d764c678d42d8a5c1e7
1 <?
2 $sur = new CairoImageSurface(FORMAT_ARGB32, 8, 8);
3 $con = new CairoContext($sur);
4 $con->save();
5 $con->setSourceRgb(0,0,1);
6 $con->paint();
8 $con->rectangle(2,2,4,4);
9 $con->clip();
10 $con->setSourceRgb(1,0,0);
11 $con->paint();
12 $con->restore();
13 $con->pushGroup();
14 $s = $con->getGroupTarget();
16 $con->setSourceRgb(0,1,0);
17 $con->fill();
18 $off = $s->getDeviceOffset();
19 $te = $off["x"];
20 echo $te;
21 $con->rectangle(2, 2, 4, 4);
22 $con->fill();
23 $con->popGroupToSource();
24 $con->paint();
26 $sur->writeToPng("get-group-target-php.png");