Added some test cases ....
[phpCairo.git] / testcases / phpCairo / extend-repeat-similar.php
blob1adcc0906f15fc9cbb6e3dc63f263e3511fb694b
1 <?
2 $sur = new CairoImageSurface(FORMAT_ARGB32, 256 + 32*2, 192 + 32*2);
3 $con = new CairoContext($sur);
4 $s = new CairoImageSurface(FORMAT_ARGB32,100, 100);
5 $s->create_from_png("romedalen.png");
6 //$s1 = new CairoImageSurface(FORMAT_ARGB32,100, 100);
7 $s1 = $sur->create_similar($sur->get_content(), 320, 256);
8 $con2 = new CairoContext($s1);
9 $con2->set_source_surface($s, 32 ,32);
10 $con2->set_operator(OPERATOR_SOURCE);
11 $pat = $con2->get_source();
12 $pat->set_extend(EXTEND_REPEAT);
13 $con2->paint();
14 $con->set_source_surface($s1, 0, 0);
15 //$pat = $con->get_source();
16 //$pat->set_extend(EXTEND_REPEAT);
17 //$con->set_source($pat);
18 $con->paint();
19 $sur->write_to_png("extend-repeat-similar-php.png");