- Inherits from:
- NSImageRep : NSObject
- Conforms to:
- NSCoding
- (NSImageRep)
- NSCopying (NSImageRep)
- NSObject (NSObject)
Declared in:
- AppKit/NSPICTImageRep.h
An NSPICTImageRep is an object that can render an image from a PICT format data stream as described in Inside Macintosh: Imaging With QuickDraw. This includes PICT format version 1, version 2, and extended version 2 pictures.
WARNINGThere 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.
Like most other kinds of NSImageReps, an NSPICTImageRep is generally used indirectly, through an NSImage object. An NSImage must be able to choose from among various representations of a given image. It also needs to provide an off-screen cache of the appropriate depth for any image it uses. It determines this information by querying its NSImageReps.
Thus to work with an NSImage, an NSPICTImageRep must be able to provide some information about its image. The bounding box is obtained from the PICT format data. Use these methods, inherited from the NSImageRep class, to set the other attributes of an NSPICTImageRep object:
Note that if these attributes aren't set, and an NSPICTImageRep is used in an NSImage with other representations, NSImage won't be able to select from among the representations. In actual practice, this usually isn't a problem.
- Creating an NSPICTImageRep
- + imageRepWithData:
- - initWithData:
- Getting image data
- - boundingBox
- - PICTRepresentation
+ (id)imageRepWithData:(NSData
*)pictData
nil
. Otherwise, it returns
a new instance of NSPICTImageRep.See Also: - PICTRepresentation
- (NSRect)boundingBox
- (id)initWithData:(NSData
*)pictData
nil
. Otherwise, it returns self.See Also: + imageRepWithData:, - PICTRepresentation
- (NSData *)PICTRepresentation