[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: MOON at MIT-MC
- From: CWH@MIT-MC
- Date: Sun ,7 May 79 17:29:30 EDT
CC: (BUG LISPM) at MIT-MC
MOON@MIT-MC 08/04/79 18:07:17
cwh@MIT-AI 08/04/79 09:38:14
To: (BUG LISPM) at MIT-AI
(TV-DRAW-LINE X0 Y0 X1 Y1 ...) should draw a line from the point X0, Y0 to
the point X1-1, Y1-1.
That line would not even have the right slope! What you're trying to
say is it should stop one pixel short of the second endpoint.
I'm not sure I agree with that either.
In addition, if one sends a window a DRAW-LINE message where one of the
x coordinates is the right margin or one of the y coordinates is the bottom
margin, truncation does not happen correctly. I think the DRAW-LINE method
may be expecting TV-DRAW-LINE to behave as I mentioned above.
Well this is just a bug in the truncation code and should be fixed there.
You are right. What I really meant to say was that if a line is drawn from
X0, Y0 to X1, Y1, the pixel at X1, Y1 should not be modified. This makes more sense
when you think about drawing in XOR mode. If I say
(DRAW-LINE X0 Y0 X1 Y1)
(DRAW-LINE X1 Y1 X2 Y2)
(DRAW-LINE X2 Y2 X0 Y0)
then a triangle will be drawn between the three points specified, but the
endpoints of the triangle will not be modified, because they will have all
been toggled twice. If I want to draw a curve in XOR mode, piecing it
myself out of line segments, then I have to worry about not drawing the last
pixel of each line segment. I think TV-DRAW-LINE should be doing this.
This makes it easier drawing lines to edges of pieces
of paper, etc. which work this way.
Not true; it might still draw over the edge depending on the slope.
Again, you are correct, but I see a somewhat different problem. If a piece of
paper has boundaries XMIN, XMAX, YMIN, YMAX, then doing
(DRAW-LINE XMIN YMIN XMAX YMAX)
will do the right thing, assuming that the second endpoint pixel is not
drawn. But drawing a line the other direction won't work, since the pixel
at XMAX, YMAX will get drawn.