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.

Inheritance


Conforms To


Import Statement


import AppKit @import AppKit;

Availability


Available in OS X v10.0 and later.
  • Creates and returns an NSEPSImageRep object initialized with the specified EPS data.

    Declaration

    Swift

    convenience init!(data epsData: NSData!)

    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.

    Import Statement

    import AppKit

    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.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.0 and later.

  • Returns the rectangle that bounds the receiver.

    Declaration

    Swift

    var boundingBox: NSRect { get }

    Objective-C

    @property(readonly) 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.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.0 and later.

  • Returns the EPS representation of the receiver.

    Declaration

    Swift

    @NSCopying var EPSRepresentation: NSData { get }

    Objective-C

    @property(readonly, copy) NSData *EPSRepresentation

    Return Value

    A data object containing the EPS data for the image.

    Import Statement

    import AppKit

    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.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.10.