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

Home » Public Forums » archive » A solution: Cursor-editing techniques/tools?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
A solution: Cursor-editing techniques/tools? [message #1585] Wed, 08 December 1993 14:24
djackson is currently offline  djackson
Messages: 31
Registered: June 1993
Member
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."
[Message index]
 
Read Message
Previous Topic: Axis label text inside plot?
Next Topic: IDL 3.5.1 released

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

Current Time: Wed Oct 08 19:37:51 PDT 2025

Total time taken to generate the page: 0.00452 seconds