From: Donald A. <as...@tr...> - 2012-10-18 10:28:27
|
simon <si...@wh...> writes: > On 17/10/2012 11:30, Donal K. Fellows wrote: > > On 17/10/2012 10:17, Richard Suchenwirth wrote: > >> With -height 0, I would assume a straight line {$x1 $y1 $x2 $y20}, > >> distance from chord = 0 would be the most intuitive behavior. > > > > Yes. Using the empty string for -height to turn the mechanism off would > > be much more towards what I would "intuitively" assume from the rest of > > Tk, but that requires more complex code. > > > Yes it is intuitive but it is also problematic. It requires the code to > create a different item type to the one requested by the user. I'd much > prefer the code to create a semi-circle in this case (as described in > one of my other replies). Of course -height 0 should not be a special case, but should draw a straight line between the end points. As height approaches zero from positive or negative, the arc approaches a straight line; it would be nuts to introduce a discontinuity. About special coding for a semicircle, that isn't even a particularly hard shape to achieve -- It's height is just half the separation. I think the desire to special-case the semicircle applies to *all* shapes in that it is clumsy to calculate a height that gives a particular angular span. Having an option for -height being relative to the separation would simplify those uses. (Other uses are better matched with an absolute height parameter.) Donald Arseneau as...@tr... |