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]> |
Lawrence D'Oliveiro <[email protected]> writes: > On Fri, 30 Jun 2017 07:02:36 +0200, David Kastrup wrote: > >> Lawrence D'Oliveiro <[email protected]> writes: >> >>> You do realize that your claim about Cairo’s “inability to reliably >>> draw a half circle that seamlessly connects with another half circle >>> under any rasterization” is complete nonsense, right? >> >> Sigh. If you cannot specify an angle for pi for which sin(angle)==0, >> you will have rasterizations of half circle arcs that won't line up >> perfectly because you then cannot make the half circles butt up >> perfectly, and "too small to be noticeable" becomes a statistic rather >> than a static feature under rasterization. > > There is no such situation. What is wrong with this list? -- David Kastrup -- cairo mailing list [email protected] https://lists.cairographics.org/mailman/listinfo/cairo
cairobad.c
(text/x-csrc, 534 B)
#include <cairo.h>
#include <math.h>
int main()
{
cairo_surface_t *surface =
cairo_image_surface_create (CAIRO_FORMAT_RGB16_565, 30, 20);
cairo_t *cr = cairo_create (surface);
cairo_set_line_width (cr, 2);
cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE);
cairo_set_source_rgba (cr, 1, 1, 1, 1);
cairo_new_sub_path (cr);
cairo_arc (cr, 15, 0.501954078674316, 5, 0, M_PI);
cairo_stroke (cr);
cairo_destroy (cr);
cairo_surface_write_to_png (surface, "hello.png");
cairo_surface_destroy (surface);
return 0;
}
hello.png
(image/png, 133 B) - not displayed