Mac Developer Library

Developer

AppKit Framework Reference NSPICTImageRep Class Reference

Options
Deployment Target:

On This Page
Language:

NSPICTImageRep

An NSPICTImageRep object renders an image from a PICT format data stream as described in the Carbon QuickDraw Manager documentation. This class can render PICT format version 1, version 2, and extended version 2 pictures.

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

    Declaration

    Objective-C

    + (instancetype)imageRepWithData:(NSData *)pictData

    Parameters

    pictData

    A data object containing the PICT data.

    Return Value

    An initialized NSPICTImageRep or nil if the object could not be initialized. Initialization may fail if the data does not conform to the PICT file format.

    Availability

    Available in OS X v10.0 and later.

  • Returns an NSPICTImageRep object initialized with the specified data.

    Declaration

    Swift

    init?(data pictData: NSData)

    Objective-C

    - (instancetype)initWithData:(NSData *)pictData

    Parameters

    pictData

    A data object containing the PICT data.

    Return Value

    An initialized NSPICTImageRep or nil if the object could not be initialized. Initialization may fail if the data does not conform to the PICT file format.

    Discussion

    If the PICT data is obtained directly from a PICT file or document, this method ignores most of the 512-byte header that occurs before the start of the actual picture data. It may retrieve some relevant meta information from the header.

    Availability

    Available in OS X v10.0 and later.

  • The rectangle that bounds the receiver. (read-only)

    Declaration

    Swift

    var boundingBox: NSRect { get }

    Objective-C

    @property(readonly) NSRect boundingBox

    Discussion

    The rectangle bounding the receiver. This rectangle is obtained from the the picFrame field in the picture header. See the Carbon QuickDraw Manager documentation for information on the picture header

    Availability

    Available in OS X v10.0 and later.

  • The receiver's PICT data. (read-only)

    Declaration

    Swift

    @NSCopying var PICTRepresentation: NSData { get }

    Objective-C

    @property(readonly, copy) NSData *PICTRepresentation

    Discussion

    The data does not include the 512-byte header, if it was present in the original data. If you want to write the data to a file, you must precede it with a 512-byte header (containing all zeros) if you want to conform to the PICT document format.

    Availability

    Available in OS X v10.0 and later.