Ignore small (or negative) radii.
Some calls use e.g. (corner_radius - 1.5). With small radii or boxy layout the radius can become negative.
This commit is contained in:
parent
b32b9ceb58
commit
b27a8169d2
@ -687,6 +687,10 @@ void
|
||||
Gtkmm2ext::rounded_rectangle (cairo_t* cr, double x, double y, double w, double h, double r)
|
||||
{
|
||||
static const double degrees = M_PI / 180.0;
|
||||
if (r < 1) {
|
||||
cairo_rectangle (cr, x, y, w, h);
|
||||
return;
|
||||
}
|
||||
|
||||
cairo_new_sub_path (cr);
|
||||
cairo_arc (cr, x + w - r, y + r, r, -90 * degrees, 0 * degrees); //tr
|
||||
|
Loading…
Reference in New Issue
Block a user