On Jan 28, 2010, at 10:39 AM, K. Darcy Otto wrote: > Thank you for this; but I'm still having a few problems. Here's what I have > as part of -mouseDragged (where hitLayer is the CA layer that has been > identified): > > CGRect p,q; > p = [hitLayer bounds]; > q = [[hitLayer superlayer] convertRect:p fromLayer:hitLayer]; > > Now, q is in the coordinate system of the superlayer - I'm not sure how to > get it into the coordinate system of the view (there is no > -convertRect:fromLayer: for the view). I've tried the NSView methods > -convertRect:toView: and -convertRectToBase: without success.
The view's layer shares a coordinate system with the view (this assumes that view.frame.size == view.bounds.size). Therefore, once you've converted to the view's layer's coordinate system, you are in the view's internal (bounds) coordinate system. When view.frame.size != view.bounds.size this is trickier, but that is an unusual case for layer backing, and I don't think it is your case. -- David Duncan Apple DTS Animation and Printing _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com