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

Home » Public Forums » archive » 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 #40337 is a reply to message #40209] Mon, 02 August 2004 12:44 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Michael Wallace writes:

> 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?

Probably. The text objects really don't know how big they are
until their dimensions are computed. I presume this occurs just
before they are displayed the first time.

> 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. ;-)

Well, you *could* do it this way. I've seen worse. :-)

But I don't think you have to. The IDLexInscribingView object
(found somewhere in the IDL distribution) has a GetBounds
method. I notice that method only looks at the models in
the graphics hierarchy. I don't know if this is because
the person who wrote that code always scales models and
not graphics primitives, or whether this is a better way to
do it. Have to so some experimenting, I guess.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Class Warfare
Next Topic: Computer Graphics Question

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

Current Time: Sun Oct 12 13:36:28 PDT 2025

Total time taken to generate the page: 0.63916 seconds