Resizing an image inside a text view
Resizing an image inside a text view
- Subject: Resizing an image inside a text view
- From: Keith Blount <email@hidden>
- Date: Sun, 28 Nov 2004 16:17:45 -0800 (PST)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
Hello,
I'm just wondering if anybody has any sample code or
general ideas about how I might go about adding image
resizing to an NSTextView. I've tried various
approaches over the past few months and kept giving up
because it's not essential to my app and it seems
*very* hard, but everytime I see it in another app it
makes me want to try again...
What I would like is either:
- the obvious, like you get in Word, Mellel or Nisus -
ie. where you click on the image that you have dropped
into an NSTextView or subclass thereof and a border
appears which you can use to resize the image.
- or, if you right click on the image inside the
NSTextView, just have a slider appear that can be used
to resize the text view. I quite like this idea.
The main problem is just accessing the NSImage of the
text view via the text attachment in such a way that I
can resize it non-destructively using one of these
methods. Well, that's *one* of the main problems - it
has to be saved in the same state by the attributed
string, too...
Has anybody done this or got ideas on how it might be
done?
Many thanks for any ideas,
Keith
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
_______________________________________________
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