10501 fixed
svn: r16662
This commit is contained in:
parent
c2de9f32c1
commit
8f0e7fd944
|
@ -79,13 +79,22 @@
|
||||||
(define w (image-width img))
|
(define w (image-width img))
|
||||||
(define h (image-height img))
|
(define h (image-height img))
|
||||||
(cond
|
(cond
|
||||||
[(and (<= 0 x0) (< x0 w) (<= 0 x1) (< x1 w) (<= 0 y0) (< y0 w) (<= 0 y1) (< y1 w))
|
[(and (<= 0 x0) (< x0 w) (<= 0 y0) (< y0 w)
|
||||||
|
(<= 0 x1) (< x1 w) (<= 0 y1) (< y1 w))
|
||||||
|
;; everything is inside
|
||||||
(add-line img x0 y0 x1 y1 c)]
|
(add-line img x0 y0 x1 y1 c)]
|
||||||
[(= x0 x1) ;; vertical
|
[(and (or (> 0 x0) (>= x0 w)) (or (> 0 y0) (>= y0 w))
|
||||||
|
(or (> 0 x1) (>= x1 w)) (or (> 0 y1) (>= y1 w)))
|
||||||
|
;; everythhing is outside
|
||||||
|
img]
|
||||||
|
[(= x0 x1)
|
||||||
|
;; vertical
|
||||||
(if (<= 0 x0 w) (add-line img x0 (app y0 h) x0 (app y1 h) c) img)]
|
(if (<= 0 x0 w) (add-line img x0 (app y0 h) x0 (app y1 h) c) img)]
|
||||||
[(= y0 y1) ;; horizontal
|
[(= y0 y1)
|
||||||
|
;; horizontal
|
||||||
(if (<= 0 y0 h) (add-line img (app x0 w) y0 (app x1 w) y0 c) img)]
|
(if (<= 0 y0 h) (add-line img (app x0 w) y0 (app x1 w) y0 c) img)]
|
||||||
[else
|
[else
|
||||||
|
;; partial off-screen
|
||||||
(local ((define lin (points->line x0 y0 x1 y1))
|
(local ((define lin (points->line x0 y0 x1 y1))
|
||||||
(define dir (direction x0 y0 x1 y1))
|
(define dir (direction x0 y0 x1 y1))
|
||||||
(define-values (upp low lft rgt) (intersections lin w h))
|
(define-values (upp low lft rgt) (intersections lin w h))
|
||||||
|
@ -186,8 +195,3 @@
|
||||||
list)
|
list)
|
||||||
(list false false 10 80))
|
(list false false 10 80))
|
||||||
|#
|
|#
|
||||||
|
|
||||||
;; -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
;
|
|
||||||
;
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user