/* Last edited on 2012-07-22 11:35:49 by stolfilocal */ /* Routines to generate Postscript drawings. */ #ifndef DRAWFIGS_H #define DRAWFIGS_H #include #include #include #include typedef r2_t Point; void plot_sites(PSStream *ps, float radius, int n, delaunay_site_t sites[]); /* Draws the points {sites[0..n-1].pt} as black dots with the given {radius} (in mm). */ void plot_points(PSStream *ps, float radius, int n, Point sites[]); /* Draws the points {sites[0..n-1]} as black dots with the given {radius} (in mm). */ Point perp_dir(Point *a, Point *b, float rbig); /* Returns a point at distance {rbig} in the direction perpendicular to the segment {a-->b}, starting at its midpoint. */ void gen_figure( char *name, float xmin, float xmax, float ymin, float ymax, void draw_proc(PSStream *ps), int eps_format ); /* Generates a Postscript file called "{name}.ps" or "{name}.eps", containing a figure of given size (user coordinates) defined by the procedure {draw_proc}. */ #endif