![]() |
BitMap |
Header: Quickdraw.h |
struct BitMap { Ptr baseAddr; SInt16 rowBytes; Rect bounds; }; typedef BitMap BitMapPtr;
A pointer to the beginning of the bit image.
The offset in bytes from one row of the image to the next. The value of the rowBytes field must be less than $4000.
The bitmaps boundary rectangle; by default, the entire main screen.
A bitmap, which is a data structure of type BitMap, defines a bit image in terms of the QuickDraw coordinate plane. (A bit image is a collection of bits in memory that form a grid.)
A bitmap has three parts:Êa pointer to a bit image, the row width of that image, and a boundary rectangle that links the local coordinate system of a graphics port to QuickDraws global coordinate system and defines the area of the bit image into which QuickDraw can draw.
The width of the boundary rectangle determines how many bits of one row are logically owned by the bitmap. This width must not exceed the number of bits in each row of the bit image. The height of the boundary rectangle determines how many rows of the image are logically owned by the bitmap. The number of rows enclosed by the boundary rectangle must not exceed the number of rows in the bit image.
The boundary rectangle defines the local coordinate system used by the port rectangle for a graphics port (described next). The upper-left corner (which for a window is called the window origin) of the port rectangle usually has a vertical coordinate of 0 and a horizontal coordinate of 0, although you can use the function SetOrigin to change the coordinates of the window origin.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)