Add some scaleable "Latency" icon

This commit is contained in:
Robin Gareus 2019-08-26 22:44:11 +02:00
parent cfc8a2c263
commit 646aded4f2
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
2 changed files with 24 additions and 0 deletions

View file

@ -1201,6 +1201,26 @@ static void icon_pcb_via (cairo_t *cr, const int width, const int height, const
VECTORICONSTROKEOUTLINE(p, fg_color); VECTORICONSTROKEOUTLINE(p, fg_color);
} }
static void icon_latency_clock (cairo_t *cr, const int width, const int height, const uint32_t fg_color)
{
const double x = width * .5;
const double y = height * .5;
const double y0 = std::min (x, y) * .45;
const double r0 = std::min (x, y) * .1;
const double r1 = std::min (x, y) * .7;
const double pt = std::min (x, y) * .1;
cairo_move_to (cr, x, y - y0);
cairo_arc (cr, x, y, r1, -.5 * M_PI, 1.25 * M_PI);
VECTORICONSTROKEOUTLINE(pt, fg_color);
cairo_arc (cr, x, y, r0, -.4 * M_PI , .9 * M_PI);
cairo_arc (cr, x, y, y0, 1.25 * M_PI, 1.25 * M_PI);
cairo_arc (cr, x, y, r0, -.4 * M_PI, -.4 * M_PI);
cairo_close_path (cr);
VECTORICONSTROKEFILL(1.0);
}
/*****************************************************************************/ /*****************************************************************************/
bool bool
@ -1325,6 +1345,9 @@ ArdourWidgets::ArdourIcon::render (cairo_t *cr,
case PowerOnOff: /* unused */ case PowerOnOff: /* unused */
icon_on_off (cr, width, height, fg_color); icon_on_off (cr, width, height, fg_color);
break; break;
case LatencyClock: /* unused */
icon_latency_clock (cr, width, height, fg_color);
break;
case NoIcon: case NoIcon:
rv = false; rv = false;
break; break;

View file

@ -64,6 +64,7 @@ namespace ArdourWidgets { namespace ArdourIcon {
Config, Config,
ConfigReset, ConfigReset,
PowerOnOff, PowerOnOff,
LatencyClock,
NoIcon, NoIcon,
}; };