Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!snorkelwacker!bloom-beacon!maui.coral.COM!tomt From: tomt@maui.coral.COM (Tom Tulinsky) Newsgroups: comp.windows.x Subject: watch out for "negative" values in width or height to XDrawArc Message-ID: <9008011420.AA21851@maui.coral.com> Date: 1 Aug 90 14:20:21 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 27 I accidently passed a negative number into an unsigned that eventually was passed to XDrawArc as the Height parameter. The negative was interpreted as a large positive (65527) and so no error message was given, but my program slowed to a crawl (XDrawArc took about 15 sec. of solid cpu processing to return; it also generated a massive amount of paging). I had to step through the drawing to find it. This happened when I was zooming out some graphics, making them smaller while subtracting some constants from them. Eventually the scaled sizes were smaller than the constant and the result went negative. Watch out... I wouldn't be surprised if similar things happened to XDraw/FillRectangle. Coral * ** Tom Tulinsky 508 460-6010 * ** Coral Network Corporation fax 508 481-6258 * ** 734 Forest St net: tomt@coral.com *** Marlboro, MA 01752 ** U S A ********* NETWORKS