Hello everybody;
I am using PV-Wave 6.10 on WinNT and have the following problem. I have
a programm and want to read the position of the cursor in a picture.
The first programm shows an example where I see the cursor as a cross-
hair:
; cursor_crosshair test one
picture = image_read('green.bmp')
image_display, picture
device, /cursor_crosshair
cursor, x, y, /normal
device, /cursor_original
print, x, y
end
But that is only an example. My problem is in the second program, which
is a short part of a realy big project.
; cursor_crosshair test two
pro mainmenuCB, wid, ind
COMMON test, image, shell
case ind of
1: begin
device, /cursor_crosshair
cursor, x, y, /normal
device, /cursor_original
print, x, y
end
2: begin
status = WwSetValue(shell, /Close)
end
else:
endcase
end
pro draw_imageCB, wid, ind
COMMON test, image, shell
image_display, image, /wset, /quiet
end
COMMON test, image, shell
main_shell = WwInit('Read the position', 'mainshell', top_shell,
/Vertical)
shell=main_shell
loop = 1
layout = WwLayout(top_shell, /Form)
menus = {,callback:'mainmenuCB', button:'read Cursor', button:'quit'}
menu_bar = WwLayout(top_shell, /board)
top_menu_bar = WwMenuBar(menu_bar, menus)
picture_file = 'green.bmp'
image = image_read(picture_file, /quiet)
image_size = size(image('pixels'))
picture_layout = WwLayout(layout, top=layout, left=layout)
picture_box = WwDrawing(picture_layout, win_id, 'draw_imageCB', $
[image_size(1), image_size(2)], $
[image_size(1),image_size(2)], /noscroll)
status = WwSetValue(main_shell, /display)
if loop eq 1 Then WwLoop
end
When i run the program and push 'read cursor'; why is the cursor not
a crosshair? Why is it the default cursor? Has anybody any ideas?
Thanks to all
michael
------------------------------------------------------------ ------
Michael Slameczka
Biomechanics Laboratory, ETH Zurich
Wagistrasse 4
CH-8952 Schlieren
Switzerland
Phone: +41 1 633 63 58
Fax: +41 1 633 11 24
E-mail: slameczka@biomech.mat.ethz.ch
|