comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Why not cursor_crosshair?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Why not cursor_crosshair? [message #10118] Tue, 21 October 1997 00:00
Michael Slameczka is currently offline  Michael Slameczka
Messages: 9
Registered: November 1996
Junior Member
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Different treatment of keyword values in version 4 and 5?
Next Topic: Image contours and thresholding

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 03:39:06 PDT 2025

Total time taken to generate the page: 1.20020 seconds