home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / clib / progs / haswinlib / info / drawing < prev    next >
Encoding:
Text File  |  1991-02-04  |  2.8 KB  |  68 lines

  1.  
  2.                       The HASWIN window library.
  3.                      ===========================
  4.                       Copyright H.A. Shaw 1990.
  5.                      ===========================
  6.  
  7.         The functions below allow a user program to directly draw on the
  8. screen.  They use the graphics primitives and fall into two types.  The
  9. functions starting "haswin_" check that at least part of the drawing is in
  10. the window area and adjust the x and y coordinates from window relative to
  11. actual screen coordinates before calling the approprate "graphics_" routine
  12. to do the actual drawing.  They do not, however, clip the object to the
  13. window.  The functions starting "graphics_" are actually macros that use
  14. absolute screen positions.
  15.  
  16. void haswin_circle(window *win, int x, int y, int r);
  17.         - draw a circle at "x","y" radius "r" in window "win".
  18.           Set the current place to "x","y".
  19.  
  20. void haswin_circlefill(window *win, int x, int y, int r);
  21.         - draw a filled circle at "x","y" radius "r" in window "win".
  22.           Set the current place to "x","y".
  23.  
  24. void haswin_draw(window *win, int x, int y);
  25.         - draw a line from the current place to "x","y" in window "win".
  26.           Set the current place to "x","y".
  27.  
  28. void haswin_drawby(window *win, int x, int y);
  29.         - draw a line from the current place by "x","y" in window "win".
  30.           Set the current place to the line end.
  31.  
  32. void haswin_fill(window *win, int x, int y);
  33.         - fill an area starting at "x","y" in window "win".
  34.           Set the current place to "x","y".
  35.  
  36. void haswin_gcol(window *win, int c, int g);
  37.         - Set the foreground colour for window "win" to "c" action "g".
  38.  
  39. void haswin_rectangle(window *win, int x, int y, int w, int h);
  40.         - draw a rectangle width "w", hieght "h" in window "win" with
  41.           "x", "y" as the bottom left corner.
  42.           Set the current place to "x","y".
  43.  
  44. void haswin_rectanglefill(window *win, int x, int y, int w, int h);
  45.         - draw a filled rectangle width "w", hieght "h" in window "win"
  46.           with "x", "y" as the bottom left corner.
  47.           Set the current place to "x","y".
  48.  
  49. void graphics_plotxy(int a, int x, int y);
  50.         - perform plot action "a" parameters "x", "y" (OS_Plot,a,x,y).
  51.  
  52.         These routines are the basic graphics drawing primitives.  Their
  53. names and parameters should be obvious.  These routines are implimented
  54. as macros using the function graphics_plotxy().
  55.  
  56. void graphics_circle(int x, int y, int r);
  57. void graphics_circlefill(int x, int y, int r);
  58. void graphics_draw(int x, int y);
  59. void graphics_drawby(int x, int y);
  60. void graphics_fill(int x, int y);
  61. void graphics_gcol(int c, int g);
  62. void graphics_move(int x, int y);
  63. void graphics_moveby(int x, int y);
  64. void graphics_rectangle(int x, int y, int w, int h);
  65. void graphics_rectanglefill(int x, int y, int w, int h);
  66.  
  67.  
  68.