Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!bloom-beacon!AMD-26.HAC.COM!dhuff From: dhuff@AMD-26.HAC.COM (Daryl Huff) Newsgroups: comp.windows.x Subject: X line definition Message-ID: <8906161725.AA02074@amd-26.hac.com> Date: 16 Jun 89 17:25:30 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 35 I am in the process of developing a plane for porting the X11R3 server to a new graphics engine and need a bit of help in two areas. (I'm fairly new to X Windows as well as expert so, sorry if these questions have been covered before.) The first area I am having trouble in is estimating the memory requirements of the X Windows server. I am trying to assess the feasibility of porting X server to a system without a disk. Therefore I need to get an idea of the amount of main memory that would be required in this type of a system. I realize the answer to this question is dependent on many things including the number of windows open, the number of fonts loaded, where I store my pixmaps (main memory or in the frame buffers), etc. The second question is about the line alorithm of the X server. The X protocol specification defines a line to be a filled rectangle with vertices at: [x1-(w*sn/2),y1+(w*cs/2)],[x1+(w*sn/2),y1-(w*cs/2)], [x2-(w*sn/2),y2+(w*cs/2)],[x2+(w*sn/2),y2-(w*cs/2)] using the fill algorithm also defined in the protocol spec. The problem I have is that in the "Strategies for Porting the X v11 Sample Server", dated March 1, 1988, section 2.4.14.2. (Second Round Optimizations), describes how to optimize the line drawing performance of X by implementing a Bresenham edge walker. First, I don't believe that line drawn with Bresenham's algorithm conforms to the X definition of a line. Second, I am confused by the reference to a need for multiplication and division in implementing Bresenham's algorithm since the algorithm was developed to avoid the need for multiplication and division when solving for a line. Any help in these two areas would be appreciated. Daryl Huff Hughes Aircraft Co.