[Gambas-user] Why font coordinates lower-left?

Rolf-Werner Eilert eilert-sprachen at ...221...
Tue Aug 20 08:20:25 CEST 2013


Hi folks, hi Benoit,

just a question about drawing and printing... While other graphic 
elements start at upper-left corner, fonts start at lower-left. This is 
true for qt4 drawing as well as for Cairo drawing as far as I could see.

This is confusing when you are not aware, for the page starts at 
upper-left with 0,0 too. So when you print a text at 0,0 you will see 
nothing, the text is above the border.

And you have to take the font height into account whenever positioning text.

In Gambas2, font positioning still started at upper-left, so when 
re-writing old code, I always have to tackle with this problem.

But maybe I just haven't understood the deeper sense behind this? :-)

Thanks for your insight

Rolf




More information about the User mailing list