Changed the entire file structure to remove the .c includes from cairo.c
[phpCairo.git] / testcases / phpCairo / extend-repeat-similar.php
blobed418b045248628d3747f3d1a9483a70908c3ab7
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->createFromPng("romedalen.png");
6 //$s1 = new CairoImageSurface(FORMAT_ARGB32,100, 100);
7 $s1 = $sur->createSimilar($sur->get_content(), 320, 256);
8 $con2 = new CairoContext($s1);
9 $con2->setSourceSurface($s, 32 ,32);
10 $con2->setPperator(OPERATOR_SOURCE);
11 $pat = $con2->getSource();
12 $pat->setExtend(EXTEND_REPEAT);
13 $con2->paint();
14 $con->setSourceSurface($s1, 0, 0);
15 $con->paint();
16 $sur->writeToPng("extend-repeat-similar-php.png");