home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!wupost!gumby!destroyer!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!epx.cis.umn.edu!mhall
- From: mhall@epx.cis.umn.edu ()
- Subject: Color and multifinder questions
- Message-ID: <1992Jul31.165703.10786@news2.cis.umn.edu>
- Sender: news@news2.cis.umn.edu (Usenet News Administration)
- Nntp-Posting-Host: epx.cis.umn.edu
- Organization: University of Minnesota
- References: <1992Jul29.154809.16204@gvl.unisys.com> <1992Jul30.020613.17378@newstand.syr.edu> <1992Jul31.151212.4777@gvl.unisys.com>
- Date: Fri, 31 Jul 1992 16:57:03 GMT
- Lines: 35
-
-
- Hello-
- I am writing a mathematics application that I want to be multifinder compatible
- and color quickdraw compatible. A few questions to that end.
-
- One- The app contains a full color plot, where every point in the window is
- assigned a color (a bifurcation plot, actually) The overhead for calling
- Moveto(h,v);
- PMForeColor(i);
- Lineto(h,v);
- is pretty much unacceptable. Is it legal to draw directly into an offscreen
- CGrafPort by just shoving index values into the Pixmap? If it is, what's the
- safest way to do it? I have done it before, in a program for My Machine Only,
- and I had to create a table to match the Palette manager's index to the logical
- index for the pixmap. Is that a Very Bad Thing? I have read about the
- tolerant+explicit usage, but that seems to be for 32 bit QD only, and I don't
- want to require that. The basic idea is to create a 256 color image that I
- can blit to any depth (4 bit to 32 bit) screen.
-
- Also- when do I handle changes in the color environment. I have been handling
- them as soon as I recieve an update event, by just redrawing everything.
- However, while in the control panel switching colors, The machine occasionally
- crashes (in the systemclick routine) I am running from inside TP4.0. I can't
- seem to find anything wrong with my redrawing, but then again, I haven't found
- any source that tells me how to handle these changes.
-
- And #3, if you are still with me, What's the best way to handle Multifinder
- during lengthy calculations? I read previously that WNEvent/GNEvent take up
- a lot of time. If I use EventAvail, will background tasks get time? If
- I am in the background, Will I get time if all I am using is EventAvail? (oh,
- If EventAvail returns true, I call WN/GNEvent). And how often should I call
- it from either back or front. Once a tick, or much more?
-
- Thank you,
- matt hall
-