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.

Inheritance


Conforms To


Import Statement


Swift

import AppKit

Objective-C

@import AppKit;

Availability


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

    Declaration

    Swift

    convenience init!(data pictData: NSData!)

    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.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    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.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

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

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.0 and later.

  • Returns the receiver's PICT data.

    Declaration

    Swift

    @NSCopying var PICTRepresentation: NSData { get }

    Objective-C

    @property(readonly, copy) NSData *PICTRepresentation

    Return Value

    A data object containing the PICT data. The returned data does not include the 512-byte header, if it was present in the original data. If you want to write the returned 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.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.0 and later.