Page 1 of 1

none PIXEL calculation

PostPosted: Fri Apr 14, 2023 7:35 am
by Jimmy
hi,

how to "calculate"
Code: Select all  Expand view
@ 2,2 SAY

to use PIXEL Option :?:

Re: none PIXEL calculation

PostPosted: Fri Apr 14, 2023 8:51 am
by Natter
Is that what you mean ?

GetTextWidth(NIL, "calculate", oFont:hFont)

Re: none PIXEL calculation

PostPosted: Fri Apr 14, 2023 8:54 am
by Antonio Linares
Dear Jimmy,

@ 200, 200 SAY ... PIXEL

Not sure what you mean

Re: none PIXEL calculation

PostPosted: Fri Apr 14, 2023 9:28 am
by Jimmy
hi Antonio,
Antonio Linares wrote:
Code: Select all  Expand view
@ 200, 200 SAY ... PIXEL

thx for Answer

so
Code: Select all  Expand view
@ 0.01, 0.01 SAY ...

are same as
Code: Select all  Expand view
@ 1, 1 SAY ... PIXEL


100 : 1 that is easy

Re: none PIXEL calculation

PostPosted: Fri Apr 14, 2023 9:45 am
by Antonio Linares
Dear Jimmy,

It was just an example. Here you have the values that FWH really uses:

FWH\include\constant.ch

Re: none PIXEL calculation

PostPosted: Fri Apr 14, 2023 10:56 am
by Jimmy
hi Antonio,
Antonio Linares wrote:FWH\include\constant.ch

ok, now understand

it depend on Control which *_CHARPIX_H and *_CHARPIX_W to use

Code: Select all  Expand view
// Say
#define SAY_CHARPIX_H   15
#define SAY_CHARPIX_W    6


so
Code: Select all  Expand view
@ 1, 2 SAY

are
Code: Select all  Expand view
@ 1*SAY_CHARPIX_W, 2*SAY_CHARPIX_H SAY ... PIXEL

right :?:

Re: none PIXEL calculation

PostPosted: Fri Apr 14, 2023 11:09 am
by Antonio Linares
correct! :-)