Re: How to center a circle?

Liste des GroupesRevenir à cl tcl 
Sujet : Re: How to center a circle?
De : ralfixx (at) *nospam* gmx.de (Ralf Fassel)
Groupes : comp.lang.tcl
Date : 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'

Date Sujet#  Auteur
16 Oct 24 * How to center a circle?12Helmut Giese
16 Oct 24 +* Re: How to center a circle?7Ralf Fassel
16 Oct 24 i`* Re: How to center a circle?6Helmut Giese
16 Oct 24 i +* Re: How to center a circle?4Ralf Fassel
16 Oct 24 i i`* Re: How to center a circle?3Helmut Giese
17 Oct 24 i i +- Re: How to center a circle?1et99
17 Oct 24 i i `- Re: How to center a circle?1Ralf Fassel
16 Oct 24 i `- Re: How to center a circle?1Rich
17 Oct 24 `* Re: How to center a circle?4Helmut Giese
17 Oct 24  +- Re: How to center a circle?1saito
18 Oct 24  `* Re: How to center a circle?2Shaun Deacon
18 Oct 24   `- Re: How to center a circle?1Helmut Giese

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal