• 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
Resizing an image in an NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Resizing an image in an NSTextView


  • Subject: Resizing an image in an NSTextView
  • From: Jeff Holland <email@hidden>
  • Date: Mon, 20 Aug 2001 00:17:46 -0500

Hello everyone,

I have some code which resizes an image in an NSTextView, and it works well enough. The problem is that if I drag and drop the image to a new location within the document, or if I save and reopen the document, the image will revert to its original size. I realize this is because it's really an NSTextAttachment which points to a file on disk. Can anyone recommend a good strategy (or even a bad strategy) for making my resized image persistent? It seems inefficient to write the resized image out to disk every time a 'Grow' or 'Shrink' button is pressed. Also, if an image is dragged from the Finder onto my NSTextView, where does it really "live" until I save the document? (Obviously, I wouldn't want my app to be resizing the original image file.)

Thanks in advance for any suggestions.

-jeff


  • Prev by Date: Re: Cocoa version of InternetConfig file mappings?
  • Next by Date: Re: in-memory files?
  • Previous by thread: Thanks, Chris
  • Next by thread: Cocoa calling CFPlugin (newbie question)
  • Index(es):
    • Date
    • Thread