domain to pixel

Bill Hibbard hiding at japan.com
Wed Jan 31 10:58:16 MST 2007


 Hi Curtis,

MouseBehavior.getScreenCoords() is essentially
the inverse of findRay() and should ddo what you
need. See visad/examples/Test35.java for an
example.

Good luck,
Bill

  ----- Original Message -----
  From: "Curtis Rueden"
  To: "VisAD mailing list"
  Subject: domain to pixel
  Date: Tue, 30 Jan 2007 17:44:07 -0600


  Hi,

  What is the easiest method for obtaining the pixel coordinates of a
  particular point in some Data object's domain space? In the past, I
  have used MouseBehavior.findRay to go the other way (the "hard" way):
  convert from pixel coordinates to cursor coordinates, and from there
  to domain coordinates using ScalarMap ranges. But what about going
  from domain to pixel? I am mostly interested in doing so for 2D
  displays.

  Thanks,
  Curtis

  ========================
=========================
=========================
=====
  To unsubscribe visad, visit:
  http://www.unidata.ucar.edu/mailing-list-delete-form.html
  ========================
=========================
=========================
=====
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
Url: http://mailman.unidata.ucar.edu/mailing_lists/archives/visad/attachments/20070131/b1b28d64/attachment.ksh 


More information about the visad mailing list