[cairo] Shouldn't Cairo use/offer degrees rather than radians?

David Kastrup dak at gnu.org
Sat Jul 1 06:51:00 UTC 2017

Bill Spitzak <spitzak at gmail.com> writes:

> On Fri, Jun 30, 2017 at 1:44 PM, David Kastrup <dak at gnu.org> wrote:
>> I am not calling any atan2d.
> Your code copied and pasted from the previous email. If this is not
> your code please explain where the code you want to use is:

Appended again.  Sorry for the atan2d thing: I should have checked for
completeness, and quoting vector->angle code with respect to Cairo was
rather pointless in the first place.

The missing code unsurprisingly was

static inline Real
atan2d (Real y, Real x)
  return atan2 (y, x) * (180.0 / M_PI);

but with regard to Cairo, the direction vector->angle is hardly
relevant, with angle->vector being the seminal API in question.

I'll append the proposed patch again (at the bottom)

David Kastrup
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Implement-cairo_matrix_init_rotate_deg-and-cairo_mat.patch
Type: text/x-diff
Size: 5889 bytes
Desc: not available
URL: <https://lists.cairographics.org/archives/cairo/attachments/20170701/432ccd78/attachment.patch>

More information about the cairo mailing list