home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 432b.lha / EzLib / doc / getbitmap.doc < prev    next >
Encoding:
Text File  |  1990-11-11  |  1.2 KB  |  41 lines

  1. FUNCTION   getbitmap()  -  allocate and initialize an arbitrary bitmap
  2.  
  3.      struct BitMap *getbitmap(depth, width, height)
  4.         int depth, width, height;
  5.  
  6.     This function will return a pointer to a bitmap of your specified
  7. depth, width, and height.   It will return NULL if any of the memory
  8. allocations fail (of course taking care to free any memory it has already
  9. allocated).
  10.  
  11.     Note that the depth variable has a maximum value of 8.  If you ask for
  12. more, the call will fail immediately.
  13.  
  14.     In this example, we will allocate a secondary 3 bitplane bitmap of
  15. 100x75 pixels.    This could be very useful for calls to BltBitMap() :
  16.  
  17.       struct BitMap *bm;
  18.  
  19.       bm = getbitmap(3, 100, 75);
  20.       if (bm == NULL)
  21.     no_bitmap();
  22.  
  23.       /* continue doing stuff ... */
  24.  
  25.       /* free up all that allocated memory */
  26.       free_bitmap(bm, 100, 75);
  27.  
  28.     This call is basically useful for allocating backup storage for making
  29. calls to BltBitMap() (or its cousins).  Just remember to check the error
  30. return, and other than that you get a fully initialized and allocated
  31. bitmap structure to your specs! ;^)
  32.  
  33. TODO : can't think of much else....
  34.  
  35. BUGS : what's up doc?
  36.  
  37. ELMER FUDD : come here you silly wabbit!
  38.  
  39. SEE ALSO : free_bitmap(), makescreen()
  40.  
  41.