Mac Developer Library

Developer

AppKit Framework Reference NSEPSImageRep Class Reference

Options
Deployment Target:

On This Page
Language:

NSEPSImageRep

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

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

    Declaration

    Objective-C

    + (instancetype)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

    Available in OS X v10.0 and later.

  • Returns an NSEPSImageRep object initialized with the specified EPS data.

    Declaration

    Swift

    init?(data epsData: NSData)

    Objective-C

    - (instancetype)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

    Available in OS X v10.0 and later.

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

    Declaration

    Swift

    func prepareGState()

    Objective-C

    - (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

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.10.