Added some test cases ....
[phpCairo.git] / testcases / phpCairo / filter-bilinear-extents.php
blob6765b41db419901907c8084c43bc47540b569b04
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->set_source_rgb(1,0,0);
7 $con2->paint();
8 $con2->set_source_rgb(0,0,1);
9 $con2->rectangle(0,1,1,1);
10 $con2->rectangle(1,0,1,1);
11 $con2->fill();
12 $con->set_source_rgb(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->set_source_surface($s,0,0);
19 $con->paint();
20 $con->restore();
21 $sur->write_to_png("filter-bilinear-extents-php.png");