Beispiel #1
0
 function end_example_box($p)
 {
     ps_restore($p);
 }
Beispiel #2
0
    ps_rotate($ps, -($ltime['seconds'] / 60.0 + $ltime['minutes'] - 15.0) * 6.0);
    ps_moveto($ps, -$radius / 10, -$radius / 20);
    ps_lineto($ps, $radius * 0.8, 0.0);
    ps_lineto($ps, -$radius / 10, $radius / 20);
    ps_closepath($ps);
    ps_fill($ps);
    ps_restore($ps);
    /* draw second hand */
    //    ps_setrgbcolor($ps, 1.0, 0.0, 0.0);
    ps_setlinewidth($ps, 2);
    ps_save($ps);
    ps_rotate($ps, -(($ltime['seconds'] - 15.0) * 6.0));
    ps_moveto($ps, -$radius / 5, 0.0);
    ps_lineto($ps, $radius, 0.0);
    ps_stroke($ps);
    ps_restore($ps);
    /* draw little circle at center */
    ps_circle($ps, 0, 0, $radius / 30);
    ps_fill($ps);
    ps_end_page($ps);
    # to see some difference
    //	sleep(1);
}
/*$buf = ps_get_buffer($ps);
$len = strlen($buf);

header("Content-type: application/pdf");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=foo.pdf");
print $buf;
*/