Examples updated to the latest Camel Case .. Was a pain converting them
[phpCairo.git] / testcases / phpCairo / nil-surface.php
blobe109653771c0d92f411b635aecd010049f7f9f71
1 <?
2 $sur = new CairoImageSurface(FORMAT_ARGB32, 1, 1);
3 $con = new CairoContext($sur);
5 $con2 = new CairoContext($sur);
6 $s = new CairoImageSurface(FORMAT_ARGB32, 0, 0);
7 $s->createFromPng("__THIS_FILE_DOES_NOT_EXIST");
8 $pat = new CairoSurfacePattern($s);
10 $con2->setSource($pat);
11 $con2->paint();
13 $con2=$con->getTarget();
14 $pat = new CairoSurfacePattern(NULL);
15 $con2->setSource($pat);
16 $con2->paint();
19 $sur->writeToPng("nil-surface-php.png");