[Gambas-user] Current position while drawing

Eilert eilert-sprachen at ...221...
Fri Jan 21 08:34:48 CET 2005


Rob schrieb:
> On Thursday 20 January 2005 12:15, Eilert wrote:
> 
>>is there a CurrentX and CurrentY like property for the
>>DrawingArea and the Printer object?
>>Or how would you solve this when you want to follow the
>>drawing cursor position after printing/drawing text?
> 
> 
> I usually just track that myself, adding to local 
> currentx/currenty variables using Draw.TextHeight and 
> Draw.TextWidth (or just adding the appropriate values if i'm 
> drawing a box or whatever.)  I agree that a "VB.Draw" class 
> might be helpful ;)
> 

Yes, but anyway - I just wanted to make sure I didn't miss anything :-)

So it's Draw.TextHeight + 1 for the next Y-drawing position, isn't it? 
I'll have to make a drawing SUB or so which takes on the values and 
knows where to go by itself.

I already made functions to calculate millimeters into pixels on screen 
and on printer, but I wonder if it will be so easy to get to the correct 
position in both cases - a typical printer may have 600 dpi, the screen 
about 96. So Draw.Height + 1 on the screen might look different from one 
pixel on the printer. Anyway, I'll have to find out, so let's start :-)

Rolf





More information about the User mailing list