Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!portal!sv!news From: leonardr@svc.portal.com (Leonard Rosenthol) Newsgroups: comp.sys.mac.programmer Subject: Re: Palette Manager Message-ID: <1990Dec28.030818.22843@svc.portal.com> Date: 28 Dec 90 03:08:18 GMT References: <5167@husc6.harvard.edu> Sender: news@svc.portal.com Reply-To: leonardr@svc.portal.com (Leonard Rosenthol) Organization: Software Ventures Corporation. Lines: 31 In article <5167@husc6.harvard.edu>, kenh@hscfsas1.harvard.edu (Ken Hancock) writes: > Well, Christmas 1990 gave me my first chance at playing with the > palette manager a bit. I grabbed the custom palette and code > from DTS's TubeTest (004) sample code and went about some > modifications. Using standard quickdraw calls, I was able > to animate anything I wanted. The only problem was what > I wanted to animate was substantially more complicated that > I wanted to create it in Studio/8 or another paint program, > put it in a resource, use DrawPicture to draw it into my > window, and then animate it. > > Is this possible? Anything imported into my window via > DrawPicture refused to animate. Anyone have any tips? > Any other programs I should use instead? > I've never tried it, but it would seem to me that in order for the Palette Manager to know which colors to draw, they have to be valid entries in the window's palette. To this end, I would pull the CLUT out of the PICT, and do a CTab2Palette to get back a PaletteHandle, which you could then use in a SetPalette call for the window. Once the palette was in place, then DrawPicture...If this doesn't work, then you may have to do the animation yourself w/o the help of the Palette Manager. It is not that difficult to do color animation with just CLUTs. I just finished a set of routines for doing so (for some screen saver modules I am working on), so it can be done. -- ---------------------------------------------------------------------- + Leonard Rosenthol | Internet: leonardr@sv.portal.com + + Software Ventures | GEnie: MACgician + + MicroPhone II Development Team | AOL: MACgician1 + ----------------------------------------------------------------------