Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!cornell!uw-beaver!microsoft!t-benw From: t-benw@microsoft.UUCP (Benjamin Waldmin) Newsgroups: comp.sys.mac.programmer Subject: Re: Help with setting pixel color Message-ID: <1668@microsoft.UUCP> Date: 1 Aug 88 20:24:29 GMT References: <77900003@peterson> Reply-To: t-benw@microsoft.UUCP (Benjamin Waldman) Organization: Microsoft Corporation, Redmond, WA Lines: 24 In article <77900003@peterson> peterson@peterson.applicon.UUCP writes: > >I would like to be able to set a pixel to a color using the color index >number rather than RGB (as in SetPixel(RGB Color)). > >I can use SetPixel, but it is much too slow for filling a window with >pixels (as in a grey scale picture). Maybe I am missing "the" way to >draw an image into a window. Can anyone help? I am new to color quickdraw! Have you read the Palette Manager manual? If you want to draw an image with certain colors, create a palette with those colors, and them use PmForeColor to set the color (you'll be setting a number corresponding to the palette position of your RGB color), and then use LineTo or something (this is also neat if you have run length encoded image data - if you have 10 pixels with the same value, do 1 PmForeColor, and then a Line to 10 pixels down the line). Unfortunately, I have no sample code, but good luck anyway. Ben Waldman Microsoft Corp. uw-beaver!microsoft!t-benw Disclaimer: These are my own thoughts, opinions, and ideas, and are not sanctioned in any way by my employer.