Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
upside down image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

upside down image



I subclassed NSPopUpButton so I could have it display only the icon but
when clicked it displays the whole menu. It all works great except that
the image in the control is upside down. It's no big deal but after a
while it starts to bug you. I draw the images in an NSTableView as well
and they work fine there. relevant code is shown below.

NSRect drawingRect;
NSRect imageRect;

drawingRect.origin.x = 9;
drawingRect.origin.y = 7;
drawingRect.size.height = 12;
drawingRect.size.width = 12;

imageRect.origin.x = 0;
imageRect.origin.y = 0;
imageRect.size = [statusDot size];

[statusDot drawInRect:drawingRect fromRect:imageRect
operation:NSCompositeSourceOver fraction:1.0];

thanks for any help and happy holidays,
Chris
_______________________________________________
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.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.