2 function draw_symbol ()
4 $dash = array(6.0, 3.0);
6 $con->rectangle ( -25, -25, 50, 50);
9 $con->move_to ( 0, -25);
10 $con->curve_to ( 12.5, -12.5, 12.5, -12.5, 0, 0);
11 $con->curve_to ( -12.5, 12.5, -12.5, 12.5, 0, 25);
12 $con->curve_to ( 12.5, 12.5, 12.5, 12.5, 0, 0);
16 $con->set_dash ( $dash, 2, 0.);
17 $con->move_to ( 0, 0);
18 $con->arc ( 0, 0, 12.5, 0, 3 * M_PI
/ 2);
23 $sur = new CairoImageSurface(FORMAT_ARGB32
,200,200);
24 $con = new CairoContext($sur);
26 $con->set_source_rgb ( 1, 1, 1);
29 $con->set_source_rgb ( 0, 0, 0);
32 $con->translate ( 50, 50);
38 $con->translate ( 150, 50);
44 $con->translate ( 150, 150);
45 $con->scale ( -1, -1);
50 $con->translate ( 50, 150);
54 $sur->write_to_png("reflected-stroke-php.png");