• 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: Upside Down
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Upside Down


  • Subject: Re: Upside Down
  • From: Scott Anguish <email@hidden>
  • Date: Tue, 12 Aug 2003 17:58:17 -0400

Is your view flipped?


On Tuesday, August 12, 2003, at 1:32 PM, Lorenzo wrote:

Hi,
I don't understand why the API "drawInRect" draws the NSImage upside down.

- (void)drawRect:(NSRect)theRect
{
NSRect fromRect = NSMakeRect(0, 0, [maskPressedSx size].width,
[maskPressedSx size].height);
NSRect imageRect = NSMakeRect(0, 0, [maskPressedSx size].width,
[maskPressedSx size].height);
[maskPressedSx drawInRect:imageRect fromRect:fromRect
operation:NSCompositeSourceOver fraction:1.0];


I guess that is because it works with the Y axis reversed.
If so, how to define the rects "fromRect" and "imageRect" in order to draw
the image properly? Thank you.



Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
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.
_______________________________________________
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.

References: 
 >Upside Down (From: Lorenzo <email@hidden>)

  • Prev by Date: Re: Examples of creating custom controls
  • Next by Date: RE: Managing Retain/Release for a ContentView
  • Previous by thread: Re: Upside Down
  • Next by thread: Multiprocessor Support
  • Index(es):
    • Date
    • Thread