• 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: Setting resolution of images in NSTextView - [SOLVED?]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Setting resolution of images in NSTextView - [SOLVED?]
      • From: Douglas Davidson <email@hidden>
References: 
 >Setting resolution of images in NSTextView (From: Jeremy Dronfield <email@hidden>)

  • Prev by Date: Re: setHidden: on MacOS 10.2
  • Next by Date: Re: favicons
  • Previous by thread: Setting resolution of images in NSTextView
  • Next by thread: Re: Setting resolution of images in NSTextView - [SOLVED?]
  • Index(es):
    • Date
    • Thread