home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c185 / 2.ddi / OWLSRC.EXE / CSCAPE / SOURCE / WINCLIP.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-06  |  1.2 KB  |  45 lines

  1. /*
  2.     winclip.c    3/9/88
  3.  
  4.     % window clipping routines.
  5.     by Ted.
  6.  
  7.     OWL 1.1
  8.     Copyright (c) 1988, by Oakland Group, Inc.
  9.     ALL RIGHTS RESERVED.
  10.  
  11.     Revision History:
  12.     -----------------
  13. */
  14. /* -------------------------------------------------------------------------- */
  15. #include "oakhead.h"
  16. #include "disppriv.h"
  17. /* -------------------------------------------------------------------------- */
  18.  
  19. unsigned win_clipbox(win, boxp)
  20.     win_type win;
  21.     opbox *boxp;
  22. /*
  23.     Return Sutherland clip code for box in window: 0 if box is completely
  24.     out of window; otherwise bits saying which side(s) it was clipped on:
  25.     1, 2, 4, 8 for right, top, left, bottom; 16 for coming through at all.
  26. */
  27. {
  28.     return(opwh_clipbox((odim) win_GetPixWidth(win),
  29.                         (odim) win_GetPixHeight(win), boxp));
  30. }
  31. /* -------------------------------------------------------------------------- */
  32. unsigned win_clippoint(win, xp, yp)
  33.     win_type win;
  34.     opcoord *xp, *yp;
  35. /*
  36.     Return Sutherland clip code for point in display: 0 if point is
  37.     in display; otherwise bits saying which side it's out on.
  38. */
  39. {
  40.     return(opwh_clippoint((odim) win_GetPixWidth(win),
  41.                           (odim) win_GetPixHeight(win), xp, yp));
  42. }
  43. /* -------------------------------------------------------------------------- */
  44.  
  45.