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

Home » Public Forums » archive » Re: Object boundaries
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: Object boundaries [message #40343 is a reply to message #40205] Mon, 02 August 2004 09:18 Go to previous message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
> Graphics objects normally have XRANGE, YRANGE and ZRANGE properties that
> tell you the coordinates of the object's bounding rectangle.
> Unfortunately, for an IDLgrAxis this does not include the tick text and
> title, but you can get those separately. Consider the following code...
>
> oaxis = obj_new('idlgraxis')
> xobjview, oaxis
> oaxis->GetProperty, XRANGE=xr, YRANgE=yr, ZRANgE=zr
> print, xr, yr, zr
> ; 0.00000000 1.0000000
> ; 0.00000000 0.20000000
> ; 0.00000000 0.00000000
> oaxis->GetProperty, TICKTEXT=ott
> ott->GetProperty, XRANGE=xr_tt, YRANGE=yr_tt, ZRANGE=zr_tt
> print, xr_tt, yr_tt, zr_tt
> ; -0.047485654 1.0474857
> ; -0.081563380 -0.020111518
> ; 0.00000000 0.00000000
> ;; Ditto for the TITLE object, but you'll have to check if it is
> ;; valid first.


While this works, is there any way to remove the call to xobjview? When
I remove that call and try the code, I get back 0.0 for all of the tick
text ranges. Is this because IDL doesn't know where it is before it's
drawn? If so, can I just create a temporary IDLgrBuffer or something,
and draw to it and grab the numbers from that? If this is the solution,
that seems pretty ugly to have to create a random IDLgrBuffer in the
middle of my code, but that's the way RSI works, I suppose. ;-)

-Mike
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Log axis howto
Next Topic: IDL Programmer Seeking Sabbatical Position

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

Current Time: Sat Oct 11 08:15:14 PDT 2025

Total time taken to generate the page: 0.96483 seconds