; Test whether a line on the screen is being selected by the mouse. ; (gldefun draw-line-selectedp (d\:draw-line pt\:vector off\:vector) ; (let ((ptp (pt - off))) ; (and (contains? (vregion d) ptp) ; is point in region near line ; ((distance (line d) ptp) < 5) ) )) ; and within distance of 5 (defun t6 (D PT OFF) (LET ((PTP (LIST (- (CAR (PROG1 PT)) (CAR (PROG1 OFF))) (- (CADR (PROG1 PT)) (CADR (PROG1 OFF)))))) (AND (AND (> = (CAR (PROG1 PTP)) (- (MIN (CAR (CADR (PROG1 D))) (+ (CAR (CADR (PROG1 D))) (CAR (CADDR (PROG1 D))))) 2)) (< = (CAR (PROG1 PTP)) (+ (- (MIN (CAR (CADR (PROG1 D))) (+ (CAR (CADR (PROG1 D))) (CAR (CADDR (PROG1 D))))) 2) (+ (ABS (CAR (CADDR (PROG1 D)))) 4))) (> = (CADR (PROG1 PTP)) (- (MIN (CADR (CADR (PROG1 D))) (+ (CADR (CADR (PROG1 D))) (CADR (CADDR (PROG1 D))))) 2)) (< = (CADR (PROG1 PTP)) (+ (- (MIN (CADR (CADR (PROG1 D))) (+ (CADR (CADR (PROG1 D))) (CADR (CADDR (PROG1 D))))) 2) (+ (ABS (CADR (CADDR (PROG1 D)))) 4))))
Contents    Page-10    Prev    Next    Page+10    Index