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 #44229] Wed, 25 May 2005 14:45 Go to previous message
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
Randall Skelton wrote:
> 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
>

Oh dear. I was already afraid that it wouldn't be just simple. But
thanks, I'll play with it.

Benjamin
[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 05:38:55 PDT 2025

Total time taken to generate the page: 0.08081 seconds