Re: Removing a NSCachedImageRep from NSImage
Re: Removing a NSCachedImageRep from NSImage
- Subject: Re: Removing a NSCachedImageRep from NSImage
- From: Brock Brandenberg <email@hidden>
- Date: Sun, 08 Sep 2002 13:14:32 -0500
Maybe I should present my problem a different way :) I want to be able to
use both a NSCachedImageRep and a NSPDFImageRep for drawing to screen and
for capturing the view data and writing to a PDF file, respectively. My
first inclination was to retain the data and switch caching on and off,
flushing the cached image rep when I wanted a PDF rep. But it seems a bit
too brute force.
What is a preferred method for doing this? If I create an NSImage with both
reps in it, is it possible to explicitly choose the rep that will be used
for drawing? Choosing a rep seems "device" oriented and I'm not printing the
PDF data, I'm capturing it to a file so I don't have any unique device
properties to determine the rep. I would like to use the NSImage draw method
of drawInRect:fromRect: to put the PDF rep in the view and the image reps
don't have this method. I'm already in a complicated transform so I hate to
append another that I later need to invert out just to use the rep drawing
method. Should I maintain two NSImages, one with a cached rep and one with a
PDF rep? Any good suggestions?
Thanks,
Brock Brandenberg
----- industrial design @ www.bergdesign.com ------
_______________________________________________
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.