Re: Setting resolution of images in NSTextView - [SOLVED?]
Re: Setting resolution of images in NSTextView - [SOLVED?]
- Subject: Re: Setting resolution of images in NSTextView - [SOLVED?]
- From: Jeremy Dronfield <email@hidden>
- Date: Fri, 30 Apr 2004 11:57:22 +0100
On 18 Apr 2004, at 3:17 pm, Jeremy Dronfield wrote:
By default, images added to an NSTextView as NSTextAttachments display
at a size determined by their dpi resolution. How can I change this so
that my text view displays images at their "true" pixel size? Bearing
in mind that the NSCell method -image isn't implemented in the
NSTextAttachmentCell protocol, setting the size would presumably have
to be done before handing the image into the attachment.
Well, I've solved this issue, but the solution raises another question.
I decided to go ahead and use [[myAttachment attachmentCell] image] to
access the image, even though -image supposedly isn't implemented in
the attachment cell protocol. Sure enough, I got the compiler warning:
warning: `-image' not implemented by protocol(s)
However, I ploughed on regardless, setting the image rep size to pixel
size. Lo and behold, it works! Images dropped into my text view display
at their pixel size instead of dpi. So, is this a compiler bug? (I'm
still using Xcode 1.1, so I'd be interested to know if the warning
still occurs in 1.2.)
Regards,
-Jeremy
_______________________________________________
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.