• 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: Problems rotating an NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems rotating an NSImage


  • Subject: Re: Problems rotating an NSImage
  • From: Gregg Witmer <email@hidden>
  • Date: Mon, 7 Mar 2005 09:37:11 -0500

// the new image is rotated by 90°, so I exchange width and height
targetImage=[[NSImage alloc] initWithSize:NSMakeSize(currentImageSize.height,currentImageSize.width)];

I ran into this one myself a while ago and I think the solution is to increase the size of the target image to a square. That is -- while you are drawing a rotated image into the new target image the target image needs to be large enough to hold the source image before and after it is rotated.


Someone may correct me on this, but I thought that's what I ran into.

Gregg
_______________________________________________
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


  • Prev by Date: textView outlet problem
  • Next by Date: A question about binding and use
  • Previous by thread: Re: Problems rotating an NSImage
  • Next by thread: Inter-class Dependent Keys
  • Index(es):
    • Date
    • Thread