• 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
Handling mouse clicks on an image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Handling mouse clicks on an image


  • Subject: Handling mouse clicks on an image
  • From: Robert Brown <email@hidden>
  • Date: Mon, 4 Oct 2004 16:11:28 -0600

I've subclassed NSImageView so that I can handle mouseDown events... now, how do I translate those mouseDown coordinates into coordinates that relate to the image data? Basically, I want to be able to click on the image and know what pixel of the original image data was selected.

Secondly, I've done [myView setImageScaling:NSScaleProportionally] and [[myView image] setScalesWhenResized:Yes] but the images still don't scale up from their defined size... scaling down works fine. Any way to get them to scale up as well? Do I have to do something different now to map mouse clicks to the appropriate pixel?

Thanks,

Robb

---------------------------------------------------
Robb Brown
Seaman Family MR Research Centre
Calgary, Alberta, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Prev by Date: Re: Open CD Tray
  • Next by Date: Oracle Database Connection within a Cocoa Application
  • Previous by thread: Re: Open CD Tray
  • Next by thread: Oracle Database Connection within a Cocoa Application
  • Index(es):
    • Date
    • Thread