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

David Kastrup dak at gnu.org
Wed Jul 5 20:37:52 UTC 2017


David Kastrup <dak at gnu.org> writes:

> Andreas Lobinger <lobingera at gmail.com> writes:
>
>> Hello colleagues(s),
>>
>> i checked, i run a 1.13.1, but 1.14.6 gets me the same result.
>>
>> btw: if i run this arc through cairo_copy_path and readout the path
>> data (see example in the API), i get:
>>
>> moveto[20.0,0.503906]
>> curveto[20.0,7.16797,10.0,7.16797,10.0,0.503906]
>>
>> rounding of digits is a side effect, the y coordinates on the moveto
>> and curveto are the same.
>
> With this print format, the numbers would look the same.  Do they
> compare equal when comparing them with == ?  And/or can you print with
> something like 20 significant digits?

The reason I ask: if the y coordinates of the curveto are _exactly_
identical, this artifact would not actually be a consequence of
trigonometric functions unless cairo_copy_path is responsible for
minuscule changes as well.

-- 
David Kastrup


More information about the cairo mailing list