home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1994 June / NEBULA_SE.ISO / SourceCode / OOP_Course / Examples / ExtendDraw / Eps.bproj / Eps.m < prev    next >
Encoding:
Text File  |  1993-01-19  |  460 b   |  29 lines

  1.  
  2. #import <appkit/appkit.h>
  3. #import "Eps.h"
  4.  
  5. @implementation Eps
  6.  
  7. id anEpsImage;
  8.  
  9. +initialize
  10. {
  11.     char buf[MAXPATHLEN + 1];
  12.     id aBundle;
  13.  
  14.     aBundle = [NXBundle bundleForClass:[self class]];
  15.     if([aBundle getPath:buf forResource:"Eps" ofType:"eps"]){
  16.         anEpsImage = [[[NXImage alloc] initFromFile:buf] setScalable:YES];
  17.     }
  18.     return self;
  19. }
  20.  
  21. -drawShape
  22. {    
  23.     [anEpsImage setSize:&bbox.size];
  24.     [anEpsImage composite:NX_SOVER toPoint:&bbox.origin];
  25.     return self;
  26. }
  27.  
  28. @end
  29.