Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, The_Judge, Grant), 898 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
measuring text size #258734
04/01/09 19:41
04/01/09 19:41
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
Hi

OMG, i know how measure the text in the width, but the total height of the text is occupaying in pixels, how do i read that??

im just asking this , because i dont know other alternative.

I have a text and i want to use the vertical slider to scroll text down, but for that i need to know how much it uses of pixels to then multyply for the slider maximum.

Im using TrueType font, and Wrap for text , using size_y.

Thanks.



Last edited by MMike; 04/01/09 19:43.
Re: measuring text size [Re: MMike] #258736
04/01/09 19:45
04/01/09 19:45
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I THINK that the height in pixels is its point-size.
ie. arial#24 I believe is 24 pixels tall. But bold/italics may vary that.

Hopefully someone else can verify this.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: measuring text size [Re: EvilSOB] #258754
04/01/09 22:42
04/01/09 22:42
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
well but i mean is.

if you have a tex like this:

"today news are.. bla bla vl
bla bla bl
bla bla "

you have 3 lines, how much from the beginning to the end, how much pixels it needed, or is ocupaying, from top to bottom, so i can say when the pixel is more then x, scroll down..

not the size of individual height.

thanks anyway

Re: measuring text size [Re: MMike] #258780
04/02/09 04:19
04/02/09 04:19
Joined: Mar 2009
Posts: 112
Germany
K
KDuke Offline
Member
KDuke  Offline
Member
K

Joined: Mar 2009
Posts: 112
Germany
I just tested.. bold and italics don't differ from the normal text-height. It is the point-size. So you simply count the number of linefeed in your string and multiply the result with the point-size.

greeting
K-Duke


Using A7 Free
Click and join the 3dgs irc community!
Room: #3dgs
Re: measuring text size [Re: KDuke] #259028
04/03/09 14:26
04/03/09 14:26
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
hum , for the line feed count.. how do calculate? and i must know the distance between the upper text and the space between the lower (bottom one) or there is no space?

for countin feed i have to do search text for \n characters?
or do you have a another way?

thanks so much

Re: measuring text size [Re: MMike] #259397
04/05/09 21:28
04/05/09 21:28
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
and how do i calculate the line feeder?

Re: measuring text size [Re: MMike] #259398
04/05/09 21:30
04/05/09 21:30
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
im using WRAP? there is not way to do the.

search in the text string for the "\n" :s

Re: measuring text size [Re: MMike] #259489
04/06/09 13:48
04/06/09 13:48
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
PLease someone help me

I need to know the Text size in y , to scrool the text down using the Hslider

And i need to input the max of the slider with that value

so its min is 0 and max is 1*size_y

but i dont know the size_y .. i mean im using that already to cut the text when y is 200 to fit the box where it is..


Help me. Thanks.

Re: measuring text size [Re: MMike] #259492
04/06/09 13:57
04/06/09 13:57
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I cant really test this easily ATM, but try doing a diagnostic on YourText.length.
It is an internal property of the TEXT object, I havent found any documentation for it, but with
any luck it may be a measure of the number of lines after 'WRAP'ing or something.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: measuring text size [Re: EvilSOB] #259508
04/06/09 15:12
04/06/09 15:12
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
lenght is not equal to lines, i dont think so..

Page 1 of 2 1 2

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1