Added some test cases ....
[phpCairo.git] / testcases / phpCairo / composite-integer-translate-source.php
blobac1ae022b6963a3b4954877ec901e03dcd6bf273
1 <?
2 $sur = new CairoImageSurface(FORMAT_ARGB32,100, 100);
3 $con = new CairoContext($sur);
5 $s = new CairoImageSurface(FORMAT_ARGB32,1,1);
6 $s->create_from_png("romedalen.png");
8 $con->set_source_rgb(0,0,0);
9 $con->rectangle(0,0,100,100);
10 $con->fill();
12 $con->translate(10,10);
13 $con->set_operator(OPERATOR_SOURCE);
14 $con->set_source_surface($s,0,0);
15 $con->rectangle(0,0,90,90);
16 $con->fill();
17 $sur->write_to_png("composite-integer-translate-source-php.png");