Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!udel!rochester!rit!mxh5795 From: mxh5795@cs.rit.edu (Michael X Houwers) Newsgroups: comp.windows.x Subject: XDrawRectangle w/ negative width/height? Message-ID: <2124@cs.rit.edu> Date: 6 Feb 91 01:19:56 GMT Sender: news@cs.rit.edu Organization: Rochester Institute of Technology, Rochester, NY Lines: 36 Hello. I was wondering if there are any known bugs in the function XDrawRectangle in Xlib. I was attempting to write a limited drawing program (boredom is a wonderful motivator...), which, at the moment draws lines and rectangles with a "rubberbanding" effect. To draw a line in the drawing window, you hold down the left mouse button and move the mouse to the position you want for the other point. The rectangle works in much the same way, by specifying one corner, then moving the pointer to the opposite corner, rubberbanding until the user releases the button. The strange behavior I noticed came when I attempted to rubberband a rectangle in any direction which would cause the width or height to be negative. If this happened, it appeared that a small corner of the old rectangle (I am using GXxor to draw over the old rectangle) is not getting redrawn correctly. So as a result, there are lots of small corners of rectangles running around the screen. I looked at the Xlib Reference Manual (from O'Reilly) and found no caveats regarding a negative width and/or height. So, the question is: can you specify a negative width or height for a rectangle with no unexpected side effects, and, if that is legal, are there any known bugs when doing this? Any help would be greatly appreciated.. Thanks, mike houwers -- --------------------------------------------------------------------------- Michael Houwers "I'm not sleazy, I"m morally challenged" bitnet: MWH5795@RITVAXA internet: mxh5795@cs.rit.edu