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 #40326 is a reply to message #40209] Mon, 02 August 2004 15:44 Go to previous messageGo to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
Look into the GetTextDimensions method in the Window object. It will tell
you the size of the text string before it is rendered.

Karl

"Michael Wallace" <mwallace.no.spam@no.spam.swri.edu.invalid> wrote in
message news:10gt8evodbiac7e@corp.supernews.com...
>>> 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.
>
> It seems to me that it should be a fairly common problem then... you
> want to do some smart positioning of text objects. You have text object
> 1 which is placed somewhere. It needs to get drawn, and then text
> object 2 can be placed smartly (since text object one now has correct
> dimension numbers). Now, to see text object 2, you have to draw again.
> So, in order to get everything positioned just right, it appears that
> you have to go through multiple draw operations.
>
> Maybe there's something preventing this from being done, but why
> couldn't the text object at least calculate ahead of time where it falls
> on the view plane? Of course, I'd want that calculation to be lazy so
> that it doesn't get called every time you apply a transformation or
> twiddle some parameter, but there could be a method which would
> calculate those numbers given the current setup of the view. In essence
> this would be a Draw command, except nothing would really get drawn and
> it'd only apply to the text object (and any related object such as an
> axis that it's a property of). Then whenever I need to know those
> numbers, I could just call that method on the object and then get the
> [XYZ]RANGE properties which will now be filled in correctly.
>
> That's enough IDL theory for now. Time to get back to making pretty
plots.
>
> -Mike
[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: Sat Nov 29 18:18:08 PST 2025

Total time taken to generate the page: 0.07728 seconds