• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSImageView PICTRepresentation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 setData:[self dataWithEPSInsideRect:[self bounds]] forType:NSPostScriptPboardType];
}
else if ([type compare:NSPDFPboardType] == NSOrderedSame)
{
// Set data for PDF type
[sender setData:[self dataWithPDFInsideRect:[self bounds]] forType:NSPDFPboardType];
}
else if ([type compare:NSTIFFPboardType] == NSOrderedSame)
{
// Set data for TIFF type
[sender setData:[[self image] TIFFRepresentation] forType:NSTIFFPboardType];
}
else if ([type compare:NSPICTPboardType] == NSOrderedSame)
{
// Set data for PICT type
// [sender setData:[[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
  • Prev by Date: Re: Equivelent to drawRect: for drawing after sub views are drawn
  • Next by Date: Re: Has anyone any experience with NSTableView and NSArrayController ?
  • Previous by thread: [SOLVED] Has anyone any experience with NSTableView and NSArrayController ?
  • Next by thread: RE: NSImageView PICTRepresentation?
  • Index(es):
    • Date
    • Thread