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

Home » Public Forums » archive » device,cursor_image ??
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: device,cursor_image ?? [message #14770 is a reply to message #14687] Wed, 24 March 1999 00:00 Go to previous message
fireman is currently offline  fireman
Messages: 49
Registered: August 1991
Member
Craig Hamilton (cah@medeng.wfubmc.edu) wrote:
: I've been trying to use a user-defined cursor via
: device,cursor_image=csr_img on an X11 Sun platform.

Craig -

I found the documentation confusing too, so once I figured it out
(v3!) I wrote a routine to translate from a bitmap to the vector. If
you blur your eyes a little you can see the cursor shape.

This shows up black; I'm not sure how to set the cursor color.

pro set_cursor

;
; SET cursor shape and hot spot
; (added per VSMR 104)
;
curs = bytarr(16,16)
curs(0,*) = [0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0]
curs(1,*) = [0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0]
curs(2,*) = [0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0]
curs(3,*) = [0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0]
curs(4,*) = [1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0]
curs(5,*) = [1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0]
curs(6,*) = [1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0]
curs(7,*) = [1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0]
curs(8,*) = [1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0]
curs(9,*) = [1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0]
curs(10,*) = [1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0]
curs(11,*) = [0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0]
curs(12,*) = [0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0]
curs(13,*) = [0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0]
curs(14,*) = [0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0]
curs(15,*) = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]

power = 2^(indgen(16)) ; define power of 2 array
cursor = intarr(16) ; cursor must be integer array
for i = 0, 15 do cursor(i) = total(curs(i,*) * power)
device, cursor_image = cursor, cursor_xy = [7,7]

end


--
-- Gwyn F. Fireman
-- General Sciences Corporation / MODIS Characterization Support Team
-- Gwyn.Fireman@gsfc.nasa.gov 301-352-2118
[Message index]
 
Read Message
Read Message
Previous Topic: Re: statistics on large arrays
Next Topic: bug in plotting with large long integers

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

Current Time: Fri Oct 10 06:50:49 PDT 2025

Total time taken to generate the page: 1.52470 seconds