Re: Shouldn't Cairo use/offer degrees rather than radians?
David Kastrup <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Organization | Organization?!? |
| Message-ID | <[email protected]> |
David Kastrup <[email protected]> writes: > I think for cairo_rotate_deg it would be uncontentious since the > degree representation of the angle does not carry into the internal > state. I'll likely propose a patch along the lines of the code we use > in LilyPond. Of course things are always more complicated than first thought: cairo_rotate passes its argument through a backend-specific hook. So the "uncontentious" implementation not impacting the internals would have to use the hook for generic transforms. That's ugly. At first glance it would seem that most backends actually only work with ctm's handled by Cairo anyway. However, the Cogl backend apparently does something different and Cogl, apparently explicitly designed for cooperating with Cairo, uses degrees in its API (cf. CoglEuler). <https://www.cogl3d.org/cogl-reference/cogl2-Eulers-(Rotations).html> <https://www.cogl3d.org/cogl-reference/cogl2-Matrices.html#cogl-matrix-rotate> So it seems tenuous to keep degrees out of the internals. -- David Kastrup -- cairo mailing list [email protected] https://lists.cairographics.org/mailman/listinfo/cairo