The cairo_arc_to error bound calculation uses eigen values in an attempt to determine the length of the major axis of the ellipse (which is, actually, possible; the eigenvalues of A A' for a given transformation A are the squares of the length of the major axes of the transformed unit circle); in many cases, for example for rotations, this will results in taking square roots of negative numbers. Fortunately, the calculation in _arc_max_angle_for_tolerance_normalized uses error > tolerance in its second loop which is always false if tolerance is NaN.
Created attachment 2983 [details] [review] pull out cairo_matrix_transformed_circle_major_axis This patch pulls out the major axis calculation from cairo-pen.c to be reused in cairo-arc.c. Changelog: * src/cairo-pen.c (_cairo_pen_vertices_needed): use new function. strip comment of derivation for major axis length. * src/cairo-matrix.c (_cairo_matrix_transformed_circle_major_axis): use the correctly transposed version of the matrix. * src/cairoint.h, src/cairo-matrix.c (_cairo_matrix_transformed_circle_major_axis): new function split out of cairo-pen.c. UTF8-ify the comment that explains the calculation.
Created attachment 2984 [details] [review] change cairo_arc_to to use the major axis calculation. This is the actual bug fix. Changelog: 2005-08-22 Bertram Felgenhauer <int-e@gmx.de> * src/cairo-arc.c (_arc_segments_needed): correct the calculation of the error bound.
Created attachment 2985 [details] [review] remove cairo_matrix_compute_eigenvalues I'm not sure about this, but I can see no use for this function in a computer graphics context; there are no users of this function left. Changelog: 2005-08-22 Bertram Felgenhauer <int-e@gmx.de> * src/cairoint.h, src/cairo-matrix.c (_cairo_matrix_compute_eigen_values): remove.
Created attachment 2996 [details] [review] ok, fix the matrix transpose first ok, this only fixes the matrix transposition bug.
(In reply to comment #4) > Created an attachment (id=2996) [edit] > ok, fix the matrix transpose first > > ok, this only fixes the matrix transposition bug. Perfect. Thanks for doing it this way. This can definitely go in right away. And the rest should be very straightforward from here.
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.
All the patches are commited with minor fixups.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.