Xref: utzoo comp.sys.mac.apps:4326 comp.sys.mac.programmer:22287 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!claris!outpost.UUCP!peirce From: peirce@outpost.UUCP (Michael Peirce) Newsgroups: comp.sys.mac.apps,comp.sys.mac.programmer Subject: Re: Application to generate Color PICT's Message-ID: <0B010004.qecx4h@outpost.UUCP> Date: 1 Mar 91 23:37:13 GMT Reply-To: peirce@outpost.UUCP Organization: Peirce Software Lines: 60 X-Mailer: uAccess - Mac Release: 1.0.3 In article <1CE00001.kq7jhj@tbomb.ice.com>, rnews@outpost.UUCP Fri Mar 1 15:01:28 1991 writes: > > > I would really like to place color PICT resources into my programs > and draw them. Until now, I simply created stuff in SuperPaint, then > copied and pasted into PICT resources in ResEdit, then drew the PICT's > with DrawPicture(). > > I presume DrawPicture() will continue to function properly with the > newer color PICT's, but I do not know what application I can use to > generate color PICTs. > > Anyone have a favorite method? I use a couple of techniques. MacDraw II 1.1 allows you to generate color PICTs using the old style 8 colors. You can get more colors by using it's dithered patterns. This method has one big benefit - it's completely compatable with older b&w systems. For example, I want a blue colored circle. I produced in MacDraw II 1.1 and cut/paste into my program using ResEdit. It gets drawn in blue on color systems and black on b&w systems. If you want to get more tricky you can go with real 8/24 bit color. Use Canvas or Michael's Draw or any other color program to produce your color pict. Then draw it using DrawPicture. There's one problem with doing this though, 8-bit color picture often look horrible wen drawn on b&w systems (often all black). To get around this you need to check the depth of the device your drawing on and draw a 1-bit picture OR an 8-bit picture depending. There still a problem with this technique. Unless you are sure your PICT bounds are restricted to one screen (like a modal dialog) you need to check for the case where your PICT spans monitors set to different bit depths. You then need to check each part and draw it at the proper bit depth. I understand System 7 adds some support for accomplishing this, though it's not all that hard to do now. Fun eh? I try to stick with the first technique for gratuitous color and only go through the work of technique two when it's really required. You'd be surprised how well technique one can work with a little fooling around. -- michael P.S. Michael's Draw (from Michael Everest at Event One (408) 734-4358) has two features that come in really handy for generating color pictures for program use: (1) it will produce anti-aliased pictures from Draw oriented data. This can lead to VERY good looking PICTs. Text is awesome (esp. when bound to a curve) and curves look terrific too. (2) It can produce 24-bit color PICTs that are automatically dithered to 8-bit when draw on an 8-bot device. Very easy to use if you can afford the memory for 24-bit PICTs. Worth checking out... -- Michael Peirce -- outpost!peirce@claris.com -- Peirce Software -- Suite 301, 719 Hibiscus Place -- Macintosh Programming -- San Jose, California 95117 -- & Consulting -- (408) 244-6554, AppleLink: PEIRCE