Path: utzoo!mnetor!uunet!dalcs!garfield!john13 From: john13@garfield.UUCP (John Russell) Newsgroups: comp.sys.amiga Subject: Problem setting drawmodes Message-ID: <4364@garfield.UUCP> Date: 10 Jan 88 23:23:57 GMT Distribution: na Organization: CS Dept., Memorial U. of Newfoundland, St. John's Lines: 39 Keywords: SetDrMd RastPort Is there a recommended way to determine the drawmode of a rastport so that it can be restored later? The rastport isn't mine so what I have been doing is reading the DrawMode tag straight from the RastPort structure. The sequence goes something like this: - LockLayerRom a window - read DrawMode variable - set DrawMode to complement - draw rubber-band box in window, erase when done - SetDrMd using the DrawMode read earlier - UnlockLayerRom the window Now if nothing is writing into the window when I do this, it works fine. And about 50-75% of the time, even if the window is being written to or scrolling when I do it the drawmode gets changed back properly. However fairly frequently the window will remain in COMPLEMENT mode, and stays that way under almost every subsequent condition (though I have found 1 program that resets it - this is a con: window I am talking about). Something else I tried was reading both the Flags and DrawMode values directly and sticking them back in manually when I was finished. Also no go. So exactly which structure values do I have to preserve in the rastport when I finish? Perhaps one or more of the drawing pens, or window structures in addition to the rastport ones? Help on this will be appreciated, version 1 of this program would be posted by now if this hadn't happened. John PS Just try doing "ln" sometime with your CLI in complement mode ;-). -- "Operating systems room, prepare for shutdown." "I never thought I'd be HAPPY to see our ratings do DOWN!" -- lots of these were sprinkled throughout the last broadcast episode of _Max_Headroom_