Changed the entire file structure to remove the .c includes from cairo.c
[phpCairo.git] / testcases / phpCairo / dashes.php
blob93831facadcd116d123826ec19a452c679832484
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->setDash ($dashes, $ndash, $offset);
12 $con->setLineWidth (10.0);
13 $con->moveTo (128.0, 25.6);
14 $con->lineTo ( 230.4, 230.4);
15 $con->relLineTo ( -102.4, 0.0);
16 $con->curveTo ( 51.2, 230.4, 51.2, 128.0, 128.0, 128.0);
17 $con->stroke ();
18 $sur->writeToPng("image_dash.png");