当前位置: 代码迷 >> 其他开发语言 >> IDL中DISP_GET_LOCATION这个的具体用法,拜托哪位高手能给小弟我讲讲,实在是找不到了,多谢啦
  详细解决方案

IDL中DISP_GET_LOCATION这个的具体用法,拜托哪位高手能给小弟我讲讲,实在是找不到了,多谢啦

热度:4051   发布时间:2013-02-26 00:00:00.0
IDL中DISP_GET_LOCATION这个的具体用法,拜托谁能给我讲讲,实在是找不到了,谢谢啦!
RT

------解决方案--------------------------------------------------------
Syntax

DISP_GET_LOCATION
Arguments
DN

The display number corresponding to an open display.
XFLOC

Upon return, this variable contains the x location of the current pixel, in modified file coordinates.
YFLOC

Upon return, this variable contains the y location of the current pixel, in modified file coordinates.
Keywords
FLOATING (optional)

Set this keyword if you want the XFLOC and YFLOC coordinates to be returned as floating point values. If this keyword is not set, then XFLOC and YFLOC will be long integer values.
NO_OFFSET (optional)

Set this keyword to return the current pixel location in ordinary zero-based file coordinates (without (xy) start values being added).
Example

Python code
;  ; This example prints out the location of   ; the current pixel for each display  ;  pro example_disp_get_location    ;     ; Get all the display numbers and     ; check to make sure at least one    ; display is present.    ;    display = envi_get_display_numbers()    if (display[0] eq -1) then return    ;    ; Print out the location of the     ; current pixel for each display    ;     for i=0, n_elements(display)-1 do begin      disp_get_location, display[i], xloc, yloc      print, display[i], xloc, yloc    endfor  end
  相关解决方案