[Gambas-user] Why is this code running twice?
Fernando Cabral
fernandojosecabral at ...626...
Wed Aug 2 13:18:22 CEST 2017
2017-08-02 7:05 GMT-03:00 Adrien Prokopowicz <adrien.prokopowicz at ...626...>:
Le Wed, 02 Aug 2017 03:38:33 +0200, Fernando Cabral <
> fernandojosecabral at ...626...> a écrit:
>
> Besides, I have a question: when a drawing area is created, it (0,0)
>> supposed to be the central point?
>>
>>
> No. Unlike math where the origin (0,0) is usually represented in the
> center,
> the origin of screen coordinates is always located in the top-left corner.
>
> If you want the actual center of your DrawingArea, you will have to use
> the following coordinates :
>
> x = DrawingArea.Width / 2
> y = DrawingArea.Height / 2
>
Problem is: this simple instruction "Paint.MoveTo(0, 0)" moves the cursor
to the center
of the drawing area. I expected it to move it to the left superior corner.
I can't figure why.
Regards
- fernando
> Hope this helps. :-)
>
> Regards,
>
> [0] http://gambaswiki.org/wiki/comp/gb.qt4/drawingarea
> [1] http://gambaswiki.org/wiki/comp/gb.qt4/drawingarea/cached
> [2] http://gambaswiki.org/wiki/comp/gb.qt4/drawingarea/refresh
>
> --
> Adrien Prokopowicz
>
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: fernandojosecabral at ...626...
Facebook: f at ...3654...
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
More information about the User
mailing list