Inherits from | |
Conforms to | |
Framework | /System/Library/Frameworks/AppKit.framework |
Availability | Available in Mac OS X v10.0 and later. |
Companion guide | |
Declared in | NSPICTImageRep.h |
Related sample code |
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.
Warning: There is no guarantee that the image will render exactly the same as it would under QuickDraw because of the differences between the display medium and QuickDraw. In particular, some transfer modes and region operations may not be supported.
Creates and returns an NSPICTImageRep
object initialized with the specified data.
+ (id)imageRepWithData:(NSData *)pictData
A data object containing the PICT data.
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.
NSPICTImageRep.h
Returns the rectangle that bounds the receiver.
- (NSRect)boundingBox
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
NSPICTImageRep.h
Returns an NSPICTImageRep
object initialized with the specified data.
- (id)initWithData:(NSData *)pictData
A data object containing the PICT data.
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.
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.
NSPICTImageRep.h
Returns the receiver's PICT data.
- (NSData *)PICTRepresentation
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.
NSPICTImageRep.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-01-26)