[Gambas-user] Draw.Text adapted to DrawingArea ?

Eilert eilert-sprachen at ...221...
Mon Feb 14 12:10:06 CET 2005


Hi all,

Just wondering how Draw.Text (and the text painting functions) could be 
recalculated to fit to the size of the DrawingArea.

Yes, I know, if I say Draw.Font.Size = 12 it will be 12 pts, but 
reference for it is the desktop's resolution. I'm doing a preview, and 
for this preview to show me an A4 page in real size I have to give 82 
instead of Desktop.Resolution (which results in somewhat smaller 
measures). This didn't matter up to now. I've introduced some graphics 
functions which show lines and stuff, all work ok because they use a 
function to recalculate millimeters into screen pixels.

Now with fonts, as long as I keep the preview 1:1 with reality, 
everything appeares correct. But what if I decide to have a preview of 
1/2 or 1/4 size?

As all sizes are measured in points on the screen, my question is, what 
can I do to evaluate the appearence of a font and resize it accordingly?

The Draw.Text() function has a width and height option, but I don't 
understand how it works (no examples in the help) and I don't know if it 
would be of any help here.

Rolf





More information about the User mailing list