Spring 1999
extern struct edge_td *edge_open(
int flag,
int width,
int height,
char *filename );
defines a work area to be used by the program in absolute screen coordinates.
The work area has a local coordinate system with (0,0) in the lower left hand corner.
extern void edge_close(
edge_td *window );
Closes the window created by edge_open.
extern void edge_clear(
edge_td *window );
Clears the entire window.
extern void edge_moves(
edge_td *edge_window,
int x,
int y);
Moves the current position (updates coordinate variables which are local
to the library) to (x,y).
extern void edge_draws(
edge_td *edge_window,
int x,
int y);
Draws a line from the current position to (x,y) and makes (x,y) the new
current position.
extern void edge_drawline(
edge_td *edge_window,
int x1,
int y1,
int x2,
int y2);
Draws a line from (x1,y1) to (x2,y2) and makes (x2,y2) the new current position.
extern void edge_plotpoint(
edge_td *edge_window,
int x,
int y);
plots a point (in black) in the work area.
extern void edge_unplotpoint(
edge_td *edge_window,
int x,
int y);
plots a point (in white) in the work area
extern void edge_getcursor(
edge_td *edge_window,
int *x,
int *y,
int *b);
On button hit, returns the x,y location of the mouse and the number of the
button that was pressed; buttons are numbered 0,1,2 going right to left!
extern int edge_checkmouse(
edge_td *edge_window,
int *x,
int *y,
int *b);
extern void edge_cleararea(
edge_td *edge_window,
int left,
int bottom,
int right,
int top);
clears the work rectangle whose corners are specified
extern int edge_screenbit(
edge_td *edge_window,
int x,
int y);
Returns the value (0 or 1) of the pixel at (x,y); plotted (black) is '1'
and unplotted (white) is '0'.
extern void edge_textput(
edge_td *edge_window,
int x,
int y,
char *str,
int len);
Places text in the work area with (x,y) being the upper left hand corner of
the text. A white border around the text overlays the workarea.
extern void edge_textxor(
edge_td *edge_window,
int x,
int y,
char *str,
int len);
The text gets 'exclusive-or'ed onto the screen so that any pixel covered by
the color of the text will have its color reversed, instead of just being
made black or white.
extern void edge_rectfill(
edge_td *edge_window,
int left,
int right,
int bot,
int top,
int color);
fill the rectangle whose corners are specified with color