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

Upside Down


  • Subject: Upside Down
  • From: Lorenzo <email@hidden>
  • Date: Tue, 12 Aug 2003 19:32:10 +0200

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.

  • Follow-Ups:
    • Re: Upside Down
      • From: Scott Anguish <email@hidden>
    • Re: Upside Down
      • From: "Alastair J.Houghton" <email@hidden>
  • Prev by Date: Re: Puzzling CGBitmapImageCreate problem
  • Next by Date: Re: Question about poseAsClass
  • Previous by thread: Re: Managing Retain/Release for a ContentView
  • Next by thread: Re: Upside Down
  • Index(es):
    • Date
    • Thread