GetMaskedPixel
GetMaskedPixel(x, y, pixFamily) //Platform file function
Retrieves the value of a specific pixel within a pix family, taking into account its mask.
- x
- The x coordinate of the point to be tested, in local (view) coordinates.
- y
- The y coordinate of the point to be tested, in local (view) coordinates.
- pixFamily
- The pix family to test.
- return value
- An integer, -1 if the (x,y) pixel location lies outside the bounds of the pix family or if the mask is off at this position, otherwise the integer value of the specified pixel is returned (see below).
IMPORTANT - This function is not defined in all ROM versions and is supplied by the NTK Platform file. Call it using this syntax:
![]()
call kGetMaskedPixelFunc with (x, y, pixFamily);
DISCUSSION
![]()
This function is similar to the existing
PtInPicture
function.The value returned for a pixel that is actually within the pix family's bounds (and at an on position in the mask) depends on the bit depth of the pix family image. For images with a bit depth of 1, 2, 4, and 8, the pixel will be an index in the range [0, 2bit depth - 1]. For example, if the image has a bit depth of 4, the value returned by the function would range from 0 to 15. If the image has a bit depth of 16 or 32, the pixels will have a direct format, and the function will return the direct RGB pixel value.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help