IPCLIP tests a point to determine if it lies in a rectangle defined by xm,ym,xx,yx and returns an integer value indicating where point is in relation to rectangle. The value can be easily be decoded by "anding" return value with the binary values of 1, 2, 4, 8.
9 | 8 | 10 -------------- 1 | 0 | 2 -------------- 5 | 4 | 6
iflag = IPCLIP(x,y,xm,ym,xx,yx) x,y (R): point to test xm,ym (R): lower left corner of rectangle xx,yx (R): upper right corner of rectangle iflag (I): clip flag (0-10) (see above)