Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!NEXTASY2.EECS.WSU.EDU!dwatola From: dwatola@NEXTASY2.EECS.WSU.EDU (David Watola) Newsgroups: comp.sys.next Subject: graphics portability between ns and ns-color Message-ID: <9106050533.AA20158@nextasy2.eecs.wsu.edu> Date: 5 Jun 91 05:31:32 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 26 X-Unparsable-Date: Tue, 4 Jun 91 22:33:29 GMT-5632:48 theoretically, the same grayscale dps code should produce the same result on a color nextstation as a monochrome nextstation, right? i don't typically get to use a color station, but i just ran across a little problem that prevented me from giving a demo on a color machine. i have a custom view class that draws one of a set of NXImages cached as NXEPSImageReps. The drawing routine for this custom view only does one thing-- it does a [theNXImage drawRepresentation:theNXEPSImageRep inRect:&theBounds] which draws a properly scaled version of that image in the view. TFM says that drawRepresentation:inRect: fills in the view with the background color, then draws the image. the problem is that this background color is white on a monochrome system, and black (same as the pen color, unfortunately) on a color system. why? i never explictly set any background colors, and the default color is NX_COLORCLEAR (i.e. transparent). so why does transparent mean white on one system and black on the other? just wondering... doesn't matter too much. dave watola dwatola@yoda.eecs.wsu.edu