Added some test cases ....
[phpCairo.git] / testcases / phpCairo / big-line.php
blob1c95ab0439ca1b9d029e519380a32ee67d304acb
1 <?
2 $width = 100;
3 $height = 100;
4 $sur = new CairoPSSurface(FORMAT_ARGB32, $width, $height);
5 $con = new CairoContext($sur);
6 //$path = new CairoPath($con);
8 $con->set_source_rgb(0,0,1);
9 $con->move_to(50,50);
10 $con->line_to(50000,50000);
11 $con->stroke();
13 $con->set_source_rgb(0,1,0);
14 $con->move_to(50,50);
15 $con->line_to(-50000,50000);
16 $con->stroke();
18 $con->set_source_rgb(1,0,0);
19 $con->move_to(50,50);
20 $con->line_to(50000,-50000);
21 $con->stroke();
23 $con->set_source_rgb(1,1,0);
24 $con->move_to(50,50);
25 $con->line_to(-50000,-50000);
26 $con->stroke();
28 $sur->write_to_png("big-line-php.png");