In article <2e338a$hv4@canopus.cc.umanitoba.ca>
djackson@ibd.nrc.ca (Dick Jackson) (that's me!) writes:
> Hi folks,
>
> I need to make up a few cursors for an IDL widget application [...]
[...]
> At the most, I'd love to hear that someone's made a widget application
> for doing cursor editing!
Umm, sorry to have missed it, but I've just discovered a widgets
application called XBM_EDIT, a bitmap editor, which will write a
byte(2,16) array definition out
to a file (the file was named 'curs' in this example), like this:
curs = [ $
[120B, 000B], $
[132B, 000B], $
[018B, 001B], $
[010B, 001B], $
[002B, 001B], $
[002B, 001B], $
[132B, 000B], $
[248B, 000B], $
[192B, 000B], $
[128B, 001B], $
[128B, 001B], $
[000B, 003B], $
[000B, 003B], $
[000B, 006B], $
[000B, 002B], $
[000B, 000B] $
]
Then, inspired by some code sent to me by Gwyn Fireman
<FIREMAN@iuegtc.gsfc.nasa.gov> (thanks!), I've got this working as a
converter to the necessary intarr(16) format for the cursor:
@curs ; to execute the file 'curs', loading the variable 'curs'
cursor = intarr(16) ; cursor must be integer array
for i = 0, 15 do cursor(i) = total(curs(*,i) * [256,1])
device, cursor_image = cursor, cursor_xy = [7,7] ; for hot-spot in
the centre
If you are going to use the cursor on a black background, another
cursor for the mask will be helpful, and can be edited in the same way,
and put into the 'device' command. A hint for the curious: to get a
full mask, try this:
device, cursor_image = cursor, cursor_xy = [7,7], cursor_mask =
intarr(16) - 1
Sorry for the trouble, and thanks to one and all who replied!
-Dick
Dick Jackson \_ djackson@ibd.nrc.ca
Institute for Biodiagnostics \_ Winnipeg, Manitoba
National Research Council Canada \_ Opinions are mine
"We're all out of hummous, so I gave you extra babagonoush."
|