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

Home » Public Forums » archive » Re: Get IDLgrText size
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Get IDLgrText size [message #43398] Tue, 12 April 2005 09:45 Go to next message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
> Is there a way to obtain the size of screen that use an IDLgrText object
> before it was drawed?

I would think not. An object that isn't drawn doesn't have any context
in world space (as defined by IDLgrView).

> I'm creating an IDLgrText object and drawing on a window. Then I consult
> its XRANGE property to know the screen size it occupies. All is ok.
>
> The problem is I need to know its screen size before draw it, and seems,
> it only be know before the object is drawed.

Why don't you:

A) draw it to an IDLgrBuffer
B) draw it to IDLgrWindow, then get the size and do whatever you are
doing with it, then draw again.

You could possibly calculate dimensions manually but that would depend
on you getting the view transform and the local coordinates of the
IDLgrText object. The first is doable but I doubt you can get at the
latter.

-Rick
Re: Get IDLgrText size [message #43497 is a reply to message #43398] Tue, 12 April 2005 10:12 Go to previous message
Antonio Santiago is currently offline  Antonio Santiago
Messages: 201
Registered: February 2004
Senior Member
Ok, I probe with:

> A) draw it to an IDLgrBuffer

I suposse the right thing is to assign the same resolution to the
IDLgrBuffer as the IDLgrWindow I will draw later.

Thanks.


PS: I want to draw "objects" compossed for a text inside a rectangle.
Then before to draw on screen both objects, I need to know the
dimensions of the text to create an adapted rectangle.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Undefined function/procedure message
Next Topic: Run-time Question

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

Current Time: Sat Oct 11 08:47:58 PDT 2025

Total time taken to generate the page: 1.35863 seconds