home *** CD-ROM | disk | FTP | other *** search
- /*
- winclip.c 3/9/88
-
- % window clipping routines.
- by Ted.
-
- OWL 1.1
- Copyright (c) 1988, by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- */
- /* -------------------------------------------------------------------------- */
- #include "oakhead.h"
- #include "disppriv.h"
- /* -------------------------------------------------------------------------- */
-
- unsigned win_clipbox(win, boxp)
- win_type win;
- opbox *boxp;
- /*
- Return Sutherland clip code for box in window: 0 if box is completely
- out of window; otherwise bits saying which side(s) it was clipped on:
- 1, 2, 4, 8 for right, top, left, bottom; 16 for coming through at all.
- */
- {
- return(opwh_clipbox((odim) win_GetPixWidth(win),
- (odim) win_GetPixHeight(win), boxp));
- }
- /* -------------------------------------------------------------------------- */
- unsigned win_clippoint(win, xp, yp)
- win_type win;
- opcoord *xp, *yp;
- /*
- Return Sutherland clip code for point in display: 0 if point is
- in display; otherwise bits saying which side it's out on.
- */
- {
- return(opwh_clippoint((odim) win_GetPixWidth(win),
- (odim) win_GetPixHeight(win), xp, yp));
- }
- /* -------------------------------------------------------------------------- */
-
-