NSImageView PICTRepresentation?
NSImageView PICTRepresentation?
- Subject: NSImageView PICTRepresentation?
- From: George Lawrence Storm <email@hidden>
- Date: Fri, 8 Oct 2004 03:52:29 -0700
I have added drag support from my NSImageView. So far I have added
support for NSPostScriptPboardType, NSPDFPboardType, and
NSTIFFPboardType.
I wish to add support for the last native type, NSPICTPboardType.
Unlike TIFFRepresentation which is part of both NSImage and
NSBitmapImageRep, PICTRepresentation is only part of NSPICTImageRep.
How can access it so I can get a copy of my PICT data?
-----
- (void)pasteboard:(NSPasteboard *)sender provideDataForType:(NSString
*)type
{
// Drag has been accepted, return the data for the type requested
if ([type compare:NSPostScriptPboardType] == NSOrderedSame)
{
// Set data for Post Script type
[sender set
Data:[self dataWithEPSInsideRect:[self bounds]]
forType:NSPostScriptPboardType];
}
else if ([type compare:NSPDFPboardType] == NSOrderedSame)
{
// Set data for PDF type
[sender set
Data:[self dataWithPDFInsideRect:[self bounds]]
forType:NSPDFPboardType];
}
else if ([type compare:NSTIFFPboardType] == NSOrderedSame)
{
// Set data for TIFF type
[sender set
Data:[[self image] TIFFRepresentation]
forType:NSTIFFPboardType];
}
else if ([type compare:NSPICTPboardType] == NSOrderedSame)
{
// Set data for PICT type
// [sender set
Data:[[self image] PICTRepresentation]
forType:NSPICTPboardType]; <-- What is the correct way of doing this?
}
}
-----
George Lawrence Storm
Macintosh Applications Development
Snohomish (Seattle), Washington
E-mail: <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden