Re: Shouldn't Cairo use/offer degrees rather than radians?

Bill Spitzak <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAL-8oAhqtK20sGVdGBNq3ZMSRJver0hUSV7vpEoEq6=uufLhJw@mail.gmail.com>
I had to change the format to CAIRO_FORMAT_ARGB32 to get this to work
(otherwise I got CAIRO_STATUS_INVALID_FORMAT) and my output image is
"correct" in that both ends are the same y pixel. The path prints
exactly the same numbers as you show.

I suspect fiddling with your y value would get the error back however.

On Thu, Jul 6, 2017 at 10:37 AM, Andreas Lobinger <[email protected]> wrote:
> Hello colleague(s),
>
> On Wed, Jul 5, 2017 at 10:37 PM, David Kastrup <[email protected]> wrote:
>
>> 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.
>
> step1: i'm attaching the c-code i used to print the data
> step2: output (with %.20f)
>
> lobi@orange4:~/juliarepo$ gcc attachment1.c -I/usr/include/cairo/ -lcairo
> lobi@orange4:~/juliarepo$ ./a.out
> moveto  20.00000000000000000000,0.50390625000000000000
> curveto 20.00000000000000000000,7.16796875000000000000
> 10.00000000000000000000,7.16796875000000000000
> 10.00000000000000000000,0.50390625000000000000
>
> (and i'm pretty much convinced that path_copy just copies data without
> interfering)
>
> Without further debugging or looking into the code i'd assume we see
> here the process of cairo modeling the arc piecewise by curveto
> operators. And in this case a single curve - regarding the scaling and
> resolution of the output device seems to be enough.
>
> step3: please run and post. I'm really interested how your cairo is
> creating a different curve.
>
> --
> cairo mailing list
> [email protected]
> https://lists.cairographics.org/mailman/listinfo/cairo
-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.