Path: utzoo!attcan!uunet!husc6!bloom-beacon!GROUCH.JPL.NASA.GOV!PJS From: PJS@GROUCH.JPL.NASA.GOV (Peter Scott) Newsgroups: comp.windows.x Subject: Clipping in X Message-ID: <890831101108.000024A5092@grouch.JPL.NASA.GOV> Date: 31 Aug 89 18:11:08 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 11 Question about the clipping algorithm used in X, prompted by some recent postings: say I draw a line from (x1, y1) to (x2,y2) within a window. Then a portion of the window is obscured, cutting off the portion of the line from (x1,y1) to (x,y). Then the window is exposed again, and I set that rectangle that needs to be repainted as a clipping region and redraw my line from (x1,y1) to (x2,y2). Will the same pixels be turned on in the segment (x1,y1)->(x,y) as before? Or does X use (say) the Cohen-Sutherland clipping algorithm, which might result in a slightly different line if the original did not pass *exactly* through (x,y)? Peter Scott (pjs@grouch.jpl.nasa.gov)