Added some test cases ....
[phpCairo.git] / testcases / phpCairo / nil-surface.php
blob3ab4949ab688984ae112dc6424e96a7a91a6e54f
1 <?
2 $sur = new CairoImageSurface(FORMAT_ARGB32, 1, 1);
3 $con = new CairoContext($sur);
5 $con2 = new CairoContext($con->get_target());
6 $s = new CairoImageSurface(FORMAT_ARGB32, 0, 0);
7 $s->create_from_png("__THIS_FILE_DOES_NOT_EXIST");
8 $pat = new CairoSurfacePattern($s);
10 $con2->set_source($pat);
11 $con2->paint();
13 $con2=$con->get_target();
14 $pat = new CairoSurfacePattern(NULL);
15 $con2->set_source($pat);
16 $con2->paint();
19 $sur->write_to_png("nil-surface-php.png");