Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!ra_robert@gsbacd.uchicago.edu From: ra_robert@gsbacd.uchicago.edu Newsgroups: comp.sys.mac.programmer Subject: "Pinstripes" appear during CopyBits Message-ID: <2330@tank.uchicago.edu> Date: 16 Mar 89 22:33:16 GMT Sender: news@tank.uchicago.edu Distribution: na Organization: University of Chicago Graduate School of Business Lines: 35 I'm writing a paint program in which my window's contents are updated by copying the contents from an offscreen bitmap into my window's bitmap. The portion of my window in which drawing is done is not the whole portRect. For this reason, when I scroll the drawing area's contents I don't follow scrollRect with SetOrigin. Rather, I keep track of how far my draw area has been scrolled and use this as an offset into my offscreen bitmap to find out where I should copy the bits from, like this: CopyBits(thePaintBMap, theUpdateWindow^.portBits, offsetCopyRect, copyRect, srcCopy, nil); where offsetCopyRect is copyRect offset by the horiz and vertical scrolled amounts, and thePaintBMap is my offscreen bitmap. OK, my problem is this: when I have scrolled horizontally and then grow the window -- causing the window's contents to be updated -- I get vertical white lines from the top of my window to the bottom; the lines appear, as do the other objects, when CopyBits is called in my update routine. These lines -- which look like pinstripes when seen against gray objects -- are one pixel wide, regular and equidistant, and they get closer together the larger I grow my window. Otherwise the window's contents are updated fine. I am really stumped. This problem doesn't happen when I've scrolled vertically,or when there has been no scrolling at all (in fact, when I scroll back to the unscrolled position, the problem disappears). Any info -- posted or e-mailed -- MUCH appreciated. Robert ------ ra_robert@gsbacd.uchicago.edu ------ generic disclaimer: all my opinions are mine