Flipped coordinates for compositeToPoint:?
Flipped coordinates for compositeToPoint:?
- Subject: Flipped coordinates for compositeToPoint:?
- From: Kentaro Kaji <email@hidden>
- Date: Sat, 17 Jan 2004 10:23:36 -0500
Hi all,
I've been having a really strange problem with an NSControl/NSCell
subclass pair I'm writing, and I'm hoping someone can explain what's
going on (or at least point me in the right direction).
In my NSCell subclass, I'm overriding drawInteriorWithFrame: to show an
NSImage like this:
[myImage compositeToPoint:aPoint operation: ...]
The problem is that NSImage seems to think aPoint is specified from
(0,0) at the upper left instead of (0,0) at the lower left. This runs
contrary to... well, everything else in Cocoa. In fact, right after
this line, I have a string I'm drawing with drawAtPoint: and this draws
from the lower left, as expected.
The documentation says: "The aPoint argument specified in the current
coordinate systemthe coordinate system of the currently focused
NSViewand designates where the lower-left corner of the image will
appear [sic]." Well, isn't the current coordinate system based at (0,0)
in the lower left corner?
Does anyone know what's happening here? Or can anyone at least back me
up here that this behavior is, in fact, weird?
I've kludged my way around this for now, but I feel like I'm missing
something and it's left me with a bad taste in my mouth.
thanks,
ken
_______________________________________________
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.