Examples updated to the latest Camel Case .. Was a pain converting them
[phpCairo.git] / testcases / phpCairo / filter-bilinear-extents.php
blobe870235b7f55b012748c1900a0ea0b21aa23582a
1 <?
2 $sur = new CairoImageSurface(FORMAT_ARGB32, 36, 36);
3 $con = new CairoContext($sur);
4 $s = new CairoImageSurface(FORMAT_ARGB32, 2, 2);
5 $con2 = new CairoContext($s);
6 $con2->setSourceRgb(1,0,0);
7 $con2->paint();
8 $con2->setSourceRgb(0,0,1);
9 $con2->rectangle(0,1,1,1);
10 $con2->rectangle(1,0,1,1);
11 $con2->fill();
12 $con->setSourceRgb(0,0,0);
13 $con->paint();
14 $con->save();
15 $con->translate(3,3);
16 $con->scale(10,10);
17 $con->translate(0.5,0.5);
18 $con->setSourceSurface($s,0,0);
19 $con->paint();
20 $con->restore();
21 $sur->writeToPng("filter-bilinear-extents-php.png");