Next Page > Hide TOC

NSEPSImageRep Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/AppKit.framework
Availability
Available in Mac OS X v10.0 and later.
Companion guide
Declared in
NSEPSImageRep.h

Overview

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

Tasks

Creating an NSEPSImageRep

Getting Image Data

Drawing the Image

Class Methods

imageRepWithData:

Creates and returns an NSEPSImageRep object initialized with the specified EPS data.

+ (id)imageRepWithData:(NSData *)epsData

Parameters
epsData

The EPS data representing the desired image.

Return Value

A new, initialized NSEPSImageRep object or nil if the object could not be initialized.

Discussion

The size of the receiver is set using the bounding box information specified in the EPS header comments.

Availability
Declared In
NSEPSImageRep.h

Instance Methods

boundingBox

Returns the rectangle that bounds the receiver.

- (NSRect)boundingBox

Return Value

The bounding box of the receiver. This rectangle is obtained from the “%%BoundingBox:” comment in the EPS header when the NSEPSImageRep object is initialized.

Availability
See Also
Declared In
NSEPSImageRep.h

EPSRepresentation

Returns the EPS representation of the receiver.

- (NSData *)EPSRepresentation

Return Value

A data object containing the EPS data for the image.

Availability
Declared In
NSEPSImageRep.h

initWithData:

Returns an NSEPSImageRep object initialized with the specified EPS data.

- (id)initWithData:(NSData *)epsData

Parameters
epsData

The EPS data representing the desired image.

Return Value

The initialized NSEPSImageRep object or nil if the object could not be initialized

Discussion

The size of the receiver is set using the bounding box information specified in the EPS header comments.

Availability
Declared In
NSEPSImageRep.h

prepareGState

Implemented by subclasses to configure the graphics state prior to drawing.

- (void)prepareGState

Discussion

The draw method of NSEPSImageRep sends this message to itself just before rendering the EPS code. The default implementation of this method does nothing. You can override it in your subclass to prepare the graphics state as needed.

Availability
Declared In
NSEPSImageRep.h

Next Page > Hide TOC


© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-01-22)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.