Added some test cases ....
[phpCairo.git] / testcases / phpCairo / dashes.php
blobc333e419a99a635921b4c2ba80c19da6e2a4e827
1 <?
2 $dashes = array(50.0, /* ink */
3 10.0, /* skip */
4 10.0, /* ink */
5 10.0 /* skip*/
6 );
7 $ndash = count($dashes);
8 $offset = -50.0;
9 $sur = new CairoImageSurface(0,500,500);
10 $con = new CairoContext($sur);
11 $con->set_dash ($dashes, $ndash, $offset);
12 $con->set_line_width (10.0);
13 $con->move_to (128.0, 25.6);
14 $con->line_to ( 230.4, 230.4);
15 $con->rel_line_to ( -102.4, 0.0);
16 $con->curve_to ( 51.2, 230.4, 51.2, 128.0, 128.0, 128.0);
17 $con->stroke ();
18 $sur->write_to_png("image_dash.png");