Sujet : Re: How to center a circle?
De : ralfixx (at) *nospam* gmx.de (Ralf Fassel)
Groupes : comp.lang.tclDate : 16. Oct 2024, 14:29:17
Autres entêtes
Message-ID : <ygah69cxjki.fsf@akutech.de>
References : 1
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
* Helmut Giese <
hgiese@ratiosoft.com>
--<snip-snip>--
| On a canvas 200 px wide and high it draws a circle at 100/100 and
| still it isn't centered. What did I do wrong?
| Any enlightenment will be highly appreciated.
Looks pretty centered to me.. although adding +1 to the x1 and x2 coords
makes it even 'more' centered :-) (TK version, since I don't have tkpath at
hand).
set x1 [expr {$width * 0.04 +1}]
...
set x2 [expr {$width - $width * 0.04 +1}]
Could be related to the origin of the coordinate system, and how items
are plotted given their coords...
R'