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
);
14 $con->setSourceSurface($s1, 0, 0);
16 $sur->writeToPng("extend-repeat-similar-php.png");