[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- To: RMS at MIT-AI
- Subject:
- From: PGS@MIT-AI
- Date: Sun ,23 Jul 79 17:39:31 EDT
CC: (BUG LISPM) at MIT-AI
Hi, Richard:
I've found what causes the clipping of the vectors drawn by the window
version of draw-line when it is drawing on a pane. It seems to be an
incompatibility between the code for ":margins-for" in LISPM2; FRAME
35 and the code for ":draw-line" in LISPM2; WINDOW 177.
":margins-for" defines a pane's margins as the difference of its edges
and those of the frame it is in:
(defmethod (window-frame-class :margins-for) (pane &aux pane-edges)
(cond ((memq pane panes)
(setq pane-edges (<- pane ':edges))
(list (- (first pane-edges) left)
(- (second pane-edges) top)
(- right (third pane-edges))
(- bottom (fourth pane-edges))))
(t (ferror nil "~S is not a pane of ~S" pane self))))
But ":draw-line", when it determines what arguments to give to
TV-DRAW-LINE-CLIPPED, subtracts the values given for the margins from
the corresponding edges of the window, not of the frame:
(DEFMETHOD (WINDOW-CLASS :DRAW-LINE) (XO YO X Y &OPTIONAL (TV-ALU TV-ALU-IOR))
(LET ((MARGINS (<- SELF ':MARGINS)))
(LET ((LLIM (+ LEFT (CAR MARGINS))) (TLIM (+ TOP (CADR MARGINS)))
(RLIM (- RIGHT (CADDR MARGINS))) (BLIM (- BOTTOM (CADDDR MARGINS))))
(TV-DRAW-LINE-CLIPPED (+ XO LLIM) (+ YO TLIM) (+ X LLIM) (+ Y TLIM)
TV-ALU SCREEN LLIM TLIM RLIM BLIM))))
So the limits it ends up with are sort of overdone.
Pat