home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / NeoIntroTCL3.0 folder / TCL / NeoDemo / Source / CNDImageGIF.cp < prev    next >
Encoding:
Text File  |  1994-02-09  |  598 b   |  40 lines  |  [TEXT/KAHL]

  1. /****
  2.  * CNDImageGIF.c
  3.  *
  4.  *    Methods for a persistent GIF image type.
  5.  *
  6.  *  Copyright © 1992 NeoLogic Systems.  All rights reserved.
  7.  *
  8.  ****/
  9.  
  10. #include "NeoTypes.h"
  11. #include "CNDImageGIF.h"
  12.  
  13. // Return the class ID for this kind of object
  14. NeoID CNDImageGIF::getClassID(void) const
  15. {
  16.     return kNDImageGIFID;
  17. }
  18.  
  19. /*
  20.  * Allocate and initialize a new instance.
  21.  */
  22. CNeoPersist *CNDImageGIF::New(void)
  23. {
  24.     CNDImageGIF *    object;
  25.  
  26.     object = new CNDImageGIF;
  27.  
  28.     return object;
  29. }
  30.  
  31. void CNDImageGIF::draw(Rect *aRect)
  32. {
  33.     PicHandle    pict;
  34.  
  35.     NeoFailNil(pict = (PicHandle)getBlob());
  36.  
  37.     DrawPicture(pict, aRect);
  38. }
  39.  
  40.