• 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
Re: Removing a NSCachedImageRep from NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: gdb mycommand -withargsformycommand
  • Next by Date: Controlling number of bounces of app icon at launch
  • Previous by thread: Removing a NSCachedImageRep from NSImage
  • Next by thread: (newbie)cocoa fun with phonics...
  • Index(es):
    • Date
    • Thread