Path: utzoo!mnetor!uunet!husc6!bloom-beacon!athena.mit.edu!tada From: tada@athena.mit.edu (Michael Zehr) Newsgroups: comp.windows.misc Subject: simple (dumb?) question Message-ID: <3132@bloom-beacon.MIT.EDU> Date: 21 Feb 88 22:02:02 GMT Sender: daemon@bloom-beacon.MIT.EDU Reply-To: tada@athena.mit.edu (Michael Zehr) Organization: Massachusetts Institute of Technology Lines: 27 Probably most of you will think this is a dumb question, but ... I've worked a bit with a few different window systems, and I've made a few observations: most window systems have a few simple primatives like draw_line, draw_polygon, fill_polygon. However, I've yet to see routines like draw_vertical_line, draw_horizontal_line, draw_rectangle, etc. With lines, usually a fair number of them are drawn either horizontally or vertically. Are the draw_line routines implemented so efficiently that there wouldn't be much of a speed savings by special-casing h. and v. lines? Or is the current design philosophy to avoid special cases as much as possible? With respect to polygons and rectangles, I've done some work with programs that do nothing but tile areas with filled rectangles, and I've had to use 4-sided filled polygons. Obviously that takes a lot more computation than filling a rectangle. Does anyone know if the window system code has transparent special cases to handle calls like that? Or don't most people need it? Of is a lot of it done in hardware so that a draw_rectangle wouldn't use much less CPU time than a draw_polygon anyway? Thanks in advance for any information... Michael Zehr "My opinions are my own ... as is my spelling."