13
0

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:
Robin Gareus 2018-10-09 19:26:02 +02:00
parent b32b9ceb58
commit b27a8169d2

View File

@ -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