home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!mcsun!news.funet.fi!funic!nntp.hut.fi!vipunen.hut.fi!jmunkki
- From: jmunkki@vipunen.hut.fi (Juri Munkki)
- Subject: Re: Direct screen writing; getting to (x,y)
- Message-ID: <1993Jan12.101446.14441@nntp.hut.fi>
- Sender: usenet@nntp.hut.fi (Usenet pseudouser id)
- Nntp-Posting-Host: vipunen.hut.fi
- Reply-To: jmunkki@vipunen.hut.fi (Juri Munkki)
- Organization: Helsinki University of Technology
- References: <1993Jan11.235448.22675@afterlife.ncsc.mil> <1993Jan12.021320.7406@nntp.hut.fi> <1993Jan12.081850.12759@afterlife.ncsc.mil>
- Date: Tue, 12 Jan 1993 10:14:46 GMT
- Lines: 52
-
- In article <1993Jan12.081850.12759@afterlife.ncsc.mil> mssmith@afterlife.ncsc.mil (M. Scott Smith) writes:
- >What would be the easiest way to handle different
- >bit depths? My primary concern for now is 8-bit.
-
- Since only 1, 2, 4, 8, 16 and 24-bit are used by the Macintosh (for now),
- it's fairly easy to implement them all separately. For more complicated
- things than point-plotting, a bottleneck function works or you can use
- the bitfield instructions in the 68020 (which means you have to write asm).
-
- >> Of course, it doesn't really work. It only works on some hardware, but
- >> it will cause big problems with a lot of machines.
- >
- > Is my new routine a bit more friendly, or does it still have a problem?
-
- It's mainly the lack of SwapMMUMode that will cause problems.
-
- >> SwapMMUMode
- >> and ShieldCursor
- >
- > I haven't messed with ShieldCursor before, so I'll look into that. I
- >assume I should be calling SwapMMUMode in my PlotPoint function, right
- >before and after I do the plot. Does this eat up much processor time?
-
- Yes, it does take quite a bit of CPU time, so you should plot as many
- points as possible between the calls to SwapMMUMode.
-
- >> This works as long as no one changes the screen resolution suddenly. It
- >> usually doesn't happen, but I think it's possible under some circumstances.
- >
- > Someone would do that?? How rude. :) Would the best strategy be to
- >periodically check the depth of the screen you're working with, like in the
- >event loop, and then to do whatever's necessary if the bit depth suddenly
- >changes? (Like maybe put up a dialog that say "hey, don't do that!", or
- >re-compute everything.)
-
- I wasn't really talking about screen depth: that's done all the time and
- it gives you a nice update event and probably always also changes the ctSeed
- of that device. It's fairly easy to detect depth changes and adapt to them.
-
- I was mainly thinking of those Pivot displays again. I don't know what kind
- of magic they do (never having used one), but it would seem to me that they
- might change the rowBytes value when the display is rotated. Then again, maybe
- they don't.
-
- >Well, thanks for all of your information. It was very helpful.
-
- I hope I wasn't too rude. This is getting to be RFAQ and it seems I'm always
- repeating this same information.
-
- --
- Juri Munkki Windsurf: fast sailing
- jmunkki@hut.fi Macintosh: fast software
-