[comp.windows.interviews] drawing a circle

grunwald@foobar.colorado.edu (Dirk Grunwald) (05/16/91)

I want to draw a circle in a Glyph. I can't seem to figure out the
semantics of the 'curve' Canvas call to draw a circle, and don't see
any other way of doing it from a Glyph.

Btw, are Glyphs the appropriate level for constructing small
widget-like things in 3.0? I don't care about backwards compatibility;
however, I don't see how Glyphs & Unidraw interact, and I see several
problems that indicate I'm missing something (like, if a glyph updates
a value asynchronously, how do you tell all Canvas's using that Glyph
that this has occured?)

thanks


Dirk Grunwald -- Univ. of Colorado at Boulder	(grunwald@foobar.colorado.edu)
						(grunwald@cs.colorado.edu)

grunwald@foobar.colorado.edu (Dirk Grunwald) (05/17/91)

>>>>> On 16 May 91 06:05:52 GMT, calder@uluru.stanford.edu (Paul Calder) said:

PC> Dirk Grunwald asks ...

PC>     I can't seem to figure out the semantics of the 'curve'
PC>     Canvas call to draw a circle

PC> There is no way to draw an exact circle using ordinary Bezier curves
PC> (or any other polynomial parametric curves).  In practice, however,
--

Argle. I'm certain it says this somewhere in the numerous InterViews
papers, but is there a reason that things like Circle/Ellipse & Arc
aren't in the Canvas class?

It would seem that these are fairly common graphics primitives, both
in use and in implementation; e.g. via XDrawArcs in X, etc and they
are typically efficient. Implementations that can't directly implement
Arcs could have subclasses that use the bezier curves exactly as you
desrcibe.

But thanks for the answer, I'm off to implement pie charts.

Dirk Grunwald -- Univ. of Colorado at Boulder	(grunwald@foobar.colorado.edu)
						(grunwald@cs.colorado.edu)