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

Home » Public Forums » archive » Re: Adding an annotation to an iTool programmatically
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: Adding an annotation to an iTool programmatically [message #44232 is a reply to message #44231] Wed, 25 May 2005 14:16 Go to previous messageGo to previous message
Randall  Skelton is currently offline  Randall Skelton
Messages: 31
Registered: October 2004
Member
You can get at what you want with the following:

iPlot, findgen(10), findgen(10)^2

idTool = itGetCurrent(TOOL=oTool)

idAnnotate = oTool->FindIdentifiers('*/ANNOTATION LAYER')

oAnnotate = oTool->getByIdentifier(idAnnotate)

oAnnotate -> add, obj_new('IDLitVisText', _STRING='I wish there were a
manual that described this', ALIGNMENT=0.5, VERTICAL_ALIGNMENT=0.5,
FONT_SIZE=14, LOCATION=[0.5,0.8])

Note that the annotation layer uses normalized coordinates while the
visualization layer will use data coordinates. This means if you want
to add titles, legends or other floating objects, use the annotation
layer but if you want to output things that depend on the data (i.e.
print formatted text corrisponding to the x,y values for every 10th
data point) then you may be best to add IDLitVisText objects directly
to the visualization layer.

The above represents a general way of scripting iTools in that you
first locate the identifier from the tree with FindIdentifiers and then
either use a DoAction/DoSetProperty operation or grab the relevent
object. Beyond using the IDs and then finding the object, below are a
few other 'useful' commands that may be of use in your journey:

oWin = oTool->GetCurrentWindow()
oView = oWin->GetCurrentView()
oVisLay = oView->GetCurrentLayer()

You may want to poke around in:

$IDL_DIR/lib/itools/framework
$IDL_DIR/lib/itools/component

The above points to where the real documentation is ;)

Cheers,
Randall
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Read other GIS format image
Next Topic: Text size weirdness

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

Current Time: Fri Oct 10 10:59:24 PDT 2025

Total time taken to generate the page: 0.39898 seconds