Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 4 - Color QuickDraw / Color QuickDraw Reference
Color QuickDraw Routines / Drawing With Color QuickDraw Colors


SetCPixel

To set the color of an individual pixel, use the SetCPixel procedure.

PROCEDURE SetCPixel (h,v: Integer; cPix: RGBColor); 
h
The horizontal coordinate of the point at the upper-left corner of the pixel.
v
The vertical coordinate of the point at the upper-left corner of the pixel.
cPix
An RGBColor record.
DESCRIPTION
For the pixel at the location you specify in the h and v parameters, the SetCPixel procedure sets a pixel value that most closely matches the RGB color that you specify in the cPix parameter. On an indexed color system, the SetCPixel procedure sets the pixel value to the index of the best-matching color in the current device's CLUT. In a direct environment, the SetCPixel procedure sets the pixel value to a 16-bit or 32-bit direct pixel value.

SPECIAL CONSIDERATIONS
The SetCPixel procedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.

SEE ALSO
To determine the color of an individual pixel, use the GetCPixel procedure, which is described on page 4-71.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996