Re: Ellipse stroke
Richard Copley <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CAPM58og76AZ1nnOkh863xF5tL+w2Sn4x5hFvSZAitL0DvbYceA@mail.gmail.com> |
> I don't have a solution for drawing with a cairo arc and a wide line. If you > want to draw wide curves though, you can use bezier points. Get some > circular or elliptical points and then get the bezier points for them. Then > draw the curve. This gives you a lot of flexibility with what you might want > to draw. As an example, I have some clocks at > > https://github.com/cecashon/OrderedSetVelociRaptor/tree/master/Misc/CircularClocks > > Some start as circles but can be deformed into an ellipse. There are some > wide lines and a few other circular shapes there also. Very cool, thanks. To achieve what I want in Cairo, I will have to replace the cairo_arc calls with lower-level cairo_curve_to calls, after having analysed quite thoroughly exactly what the final stroke is supposed to look like. It's more fun in HTML5 Canvas -- it seems happy to draw any ellipse arc (even if the minor semiaxis is zero, which is ruled out by the Cairo API.) I confess I'm not sure exactly what shaped path HTML5 Canvas creates for the strokes in the cases I illustrated. To match the ease-of-use of HTML5 Canvas, I think a "cairo_ellipse" API would be needed. (Ignore the naive suggestions in my OP, of course, as they don't fit Cairo's path representation.) -- cairo mailing list [email protected] https://lists.cairographics.org/mailman/listinfo/cairo