• 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: Cocoa-dev Digest, Vol 7, Issue 57
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa-dev Digest, Vol 7, Issue 57


  • Subject: Re: Cocoa-dev Digest, Vol 7, Issue 57
  • From: Daniel Meachum <email@hidden>
  • Date: Thu, 14 Jan 2010 01:15:04 +0900

NSImage *image = [imageView image];	//IBOutlet to ImageView
NSSize imageSize = [image size];
NSLog(@"Height: %f, Width: %f", imageSize.height, imageSize.width);

This number stayed the same for me regardless of the scaling and matched the dimensions specified in the Finder.

On Jan 14, 2010, at 12:46 AM, email@hidden wrote:

> Hello all.
> I want to get the actual size of the NSImage which I dragged into an NSImaveView that has the imageScaling to NSImageScaleProportionallyUpOrDown.
>
> I have found some answers on the web, but it seems Im still missing something, or those answer don't apply to me.. On of them was to create a Category of NSImageCell and there add a method like this
>
>
> @implementation NSImageCell  (XWSImageCellCategory);
>
> -(NSRect)rectCoveredByImageInBounds:(NSRect) bounds{
> 	return [super  imageRectForBounds:bounds];
> }
>
>
> I have done that.. but Im getting still the size of the NSImageView.
>
> I dunno if  Im missing something in my Custom NSImageView, overriding some method, but I don't see what might help me.
>
> Thanks a lot
>
> Best Regards
>
> Gustavo Pizano

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: coreAnimation CALayers and NSViews, which to use ?
  • Next by Date: Problem printing offscreen PDFViews
  • Previous by thread: Re: coreAnimation CALayers and NSViews, which to use ?
  • Next by thread: Re: Cocoa-dev Digest, Vol 7, Issue 57
  • Index(es):
    • Date
    • Thread