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

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