Copyright ã1994 by NeXT Computer, Inc.  All Rights Reserved.

NSEPSImageRep 

Inherits From:	NSImageRep : NSObject

Conforms To:	NSCoding, NSCopying (NSImageRep)
NSObject (NSObject)

Declared In:	AppKit/NSEPSImageRep.h 

Class Description

An NSEPSImageRep is an object that can render an image from encapsulated PostScript code (EPS). 

Like most other kinds of NSImageReps, an NSEPSImageRep is generally used indirectly, through an NSImage object. An NSImage must be able to choose between various representations of a given image. It also needs to provide an off-screen cache of the appropriate depth for any image it uses. It determines this information by querying its NSImageReps.

Thus to work with an NSImage, an NSEPSImageRep must be able to provide some information about its image. The size of the object is set from the bounding box specified in the EPS header comments. Use these methods, inherited from the NSImageRep class, to set the other attributes of the NSEPSImageRep: 

setColorSpaceName:
setAlpha:
setPixelsHigh:
setPixelsWide:
setBitsPerSample:

Initializing a New Instance 

+ (id)imageRepWithData:(NSData *)epsData	Invokes initWithData: to return an instance with data from epsData.

- (id)initWithData:(NSData *)epsData	Initialize an instance with data from epsData.

Getting Image Data 

- (NSRect)boundingBox	Returns the rectangle that bounds the image.

- (NSData *)EPSRepresentation	Returns the EPS representation of the image.

Drawing the Image 

- (void)prepareGState	Implemented by subclasses to initialize the graphics state before the image is drawn.