[cairo-bugs] [Bug 24442] New cairo_path_t method - cairo_rounded_rectangle

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Oct 26 05:28:44 PDT 2009


http://bugs.freedesktop.org/show_bug.cgi?id=24442


Chris Wilson <chris at chris-wilson.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




--- Comment #2 from Chris Wilson <chris at chris-wilson.co.uk>  2009-10-26 05:28:41 PST ---
Note that for your rounded rectangle all your need is (hmm, without checking
through the the ordering of corners):

cairo_new_sub_path (cr);
cairo_arc (cr, x + radius, y + height - radius, radius, 0.5 * M_PI, M_PI);
cairo_arc (cr, x + radius, y + radius, radius, M_PI, 1.5 * M_PI);
cairo_arc (cr, x + width - radius, y + radius, radius, 1.5 * M_PI, 2.0 * M_PI);
cairo_arc (cr, x + width - radius, y + height - radius, radius, 2.0 *M_PI, 0.5
* M_PI);
cairo_close_path (cr);

However, there is a big difference between cairo_rectangle() and
cairo_rounded_rectangle(), namely that nobody will agree on how
cairo_rounded_rectangle() should work. In other words, everybody has a
different aesthetic interpretation of how the rounded rectangle should look...
You used constant radius of curvature around the corners, maybe they should
vary in proportional to the relative edge lengths? Perhaps they should be
inverted for use in snug fitting scrollbars? This is not a decision that can be
made by cairo, but must be made in conjunction with the graphics designers and
as demonstrated will only need a trivial function to emit the correct shape -
but one that varies with intent.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list