Skip navigation.
 
mlFwd: Where was the mouse clicked????
FROM : Brian O'Brien
DATE : Mon Apr 25 18:45:37 2005

Begin forwarded message:

> From: Brian O'Brien <<email_removed>>
> Date: April 25, 2005 10:44:01 AM MDT
> To: Stephane Sudre <<email_removed>>
> Subject: Re: Where was the mouse clicked????
>
>
> On Apr 25, 2005, at 10:32 AM, Stephane Sudre wrote:
>

>>
>> On 25 avr. 05, at 18:32, Brian O'Brien wrote:
>>

>>> I've read this document but cannot figure out what I need to know 
>>> and cant' find any other document or
>>> posting that explains this simple concept.
>>> http://developer.apple.com/documentation/Cocoa/Conceptual/
>>> BasicEventHandling/index.html
>>>
>>> I get a mouseDown event in my NSImageView subclass, but the 
>>> coordinates that it is giving me
>>> seem to have nothing to do with the location I clicked on within the 
>>> image...
>>> The image being displayed is 256x256 pixels.

>>
>> - (void) mouseDown:(NSEvent *) theEvent
>> {
>>     NSPoint mouseLoc=[self convertPoint:[theEvent locationInWindow] 
>> fromView:nil];
>>
>>     [...]
>> }
>>
>>

>
> Ok so that works wonderfully...
> One last problem...
> The image has a frame around it that was draw as NSImageFrameGrayBezel
> When I click on the frame is when I get the origin 0, 0 but really
> I don't want the frame to be calculated as the origin.  I want the
> origin to be the bottom left corner of the image not the bottom
> left corner of the frame...  So is there some way of getting the
> dimensions of the frame and translating?
>
>
>

Related mailsAuthorDate
mlFwd: Where was the mouse clicked???? Brian O'Brien Apr 25, 18:45
mlFwd: Where was the mouse clicked???? Brian O'Brien Apr 25, 18:45