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

Home » Public Forums » archive » Re: character size in normal coordinates
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: character size in normal coordinates [message #13610] Tue, 24 November 1998 00:00 Go to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
David Fanning wrote:
>
> David Foster (foster@bial1.ucsd.edu) writes:
>
>> Since !D.[X|Y]_CH_SIZE give the width and height of the rectangle
>> that encloses the "average" character in the current font, in
>> device units (usually pixels) [from the Online help on !D]:
>>
>> x_ch_norm = !D.X_CH_SIZE / !D.X_SIZE
>> y_ch_norm = !D.Y_CH_SIZE / !D.Y_SIZE
>>
>> would be my guess. If your window is 100 pixels wide, and your
>> object is 50 pixels wide, then in normalized coordinates that
>> would be .5 . Or am I having a bad hair day?
>
> I would say your hair will be turning prematurely gray
> unless you cast one of those values on the right-hand
> side of the equation to FLOAT. :-)
>
> Cheers,
>
> David

Doh!

God I hate this pitfall!

Dave

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: max value of function
Next Topic: Re: 5.2 looks nice

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

Current Time: Wed Oct 08 15:49:50 PDT 2025

Total time taken to generate the page: 0.00931 seconds