• 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: Rotating NSImage?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rotating NSImage?


  • Subject: Re: Rotating NSImage?
  • From: Matthew Formica <email@hidden>
  • Date: Thu, 07 Jun 2001 17:10:33 -0700

-compositeToPoint:operation: ignores the rotation. For historical reasons,
this API can't be fixed, so you should use the new equivalent -drawAtPoint:
methods instead if you care about scale/rotation.

Matthew Formica
Apple DTS Engineer - Dev Tools and Cocoa
email@hidden

on 6/7/01 11:37 AM, Clyde McQueen at email@hidden remarked:

> Should I expect NSImage objects to rotate when I rotate the enclosing
> view? I've tried two ways:
>
> 1. An NSImageView set up in IB.
> 2. A custom view with:
>
> - (void)drawRect:(NSRect)aRect
> {
> NSRect bounds = [self bounds];
> NSImage *image = [[[NSImage alloc]
> initByReferencingFile:PICTURE_PATH] autorelease];
> NSPoint p;
>
> p.x = bounds.origin.x + bounds.size.width / 2;
> p.y = bounds.origin.y + bounds.size.height / 2;
>
> [image compositeToPoint:p operation:NSCompositeCopy];
>
> // ... and some NSBezierPaths so I can see the rotation...
> }
>
> In all cases the images show up just fine, but they appear to ignore the
> rotation. What did I forget to do, or is this a limitation of NSImage?
>
> /Clyde
> _______________________________________________
> cocoa-dev mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev


  • Follow-Ups:
    • Re: Rotating NSImage?
      • From: Clyde McQueen <email@hidden>
References: 
 >Rotating NSImage? (From: Clyde McQueen <email@hidden>)

  • Prev by Date: Re: Rotating NSImage?
  • Next by Date: Re: "Tricks" of the "Trade"
  • Previous by thread: Re: Rotating NSImage?
  • Next by thread: Re: Rotating NSImage?
  • Index(es):
    • Date
    • Thread