Re: Copying PICT image
Re: Copying PICT image
- Subject: Re: Copying PICT image
- From: email@hidden (Simon Fraser)
- Date: Fri, 14 Feb 2003 09:47:09 -0800
On Thursday, February 13, 2003, at 03:33 pm, Simon Bovet wrote:
Sketch can copy a TIFF representation of the selected objects onto the
pasteboard. Now, is it possible to copy a PICT representation instead,
in order to keep a vector image.
Basically, how can I create PICT data from a simple NSView in order to
paste it into some other application? I mean PICT because it seams
that other vector representations (such as PDF) aren't generally
accepted (e.g. if Sketch doesn't provide the TIFF representation,
TextEdit pixelize the pasted picture when printing, and Word doesn't
even accept to paste it!)
Any help greatly appreciated!
The usual way to get PICT data on the clipboard from raster-based image
data is to get the data into a GWorld, call OpenPicture(), and then
CopyBits this GWorld on top of itself. Finally call ClosePicture().
You should end up with a PicHandle, whose size you can determine by
calling GetHandleSize().
What remains, then, is to get NSImage data into a GWorld. This is left
as an exercise for the reader :)
Simon
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.