Updating checkpoint ...
[phpCairo.git] / testcases / phpCairo / move-to-show.php
blob772062f4d5ac273274215669bc0fc93c299ce165
1 <?
2 $sur = new CairoImageSurface(FORMAT_RGB24, 2, 2);
3 $con = new CairoContext($sur);
4 $s = new CairoImageSurface(FORMAT_RGB24, 2, 2);
5 $c = array();
7 $color="";
8 $color.=chr(0xff);
9 $color.=chr(0xff);
10 $color.=chr(0xff);
11 $color.=chr(0xff);
13 $c[0]= $color;
15 $color = "";
16 $color.=chr(0x00);
17 $color.=chr(0x00);
18 $color.=chr(0xff);
19 $color.=chr(0xff);
21 $c[1] = $color;
23 $color = "";
24 $color.=chr(0x00);
25 $color.=chr(0xff);
26 $color.=chr(0x00);
27 $color.=chr(0xff);
29 $c[2] = $color;
31 $color = "";
32 $color.=chr(0xff);
33 $color.=chr(0x00);
34 $color.=chr(0x00);
35 $color.=chr(0xff);
37 $c[3] = $color;
40 for($i =0 ; $i<4;$i++)
42 $s ->createFromData($c[$i], FORMAT_RGB24, 1 , 1, 4);
43 $con->setSourceSurface($s, $i%2, $i/2);
44 $con->paint();
48 $sur->writeToPng("move-to-show-surface-php.png");