summaryrefslogtreecommitdiff
path: root/libs/widgets
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-08-26 22:44:11 +0200
committerRobin Gareus <robin@gareus.org>2019-08-26 22:44:11 +0200
commit646aded4f23a043705ae96ea5f5ce47da6b3da41 (patch)
treeca61321eeb7997a32d7c8d1d90c5f761138ff115 /libs/widgets
parentcfc8a2c263e00eaf2d09d1e7c92cff3d0f61be13 (diff)
Add some scaleable "Latency" icon
Diffstat (limited to 'libs/widgets')
-rw-r--r--libs/widgets/ardour_icon.cc23
-rw-r--r--libs/widgets/widgets/ardour_icon.h1
2 files changed, 24 insertions, 0 deletions
diff --git a/libs/widgets/ardour_icon.cc b/libs/widgets/ardour_icon.cc
index 67c02aa7de..ada11e26be 100644
--- a/libs/widgets/ardour_icon.cc
+++ b/libs/widgets/ardour_icon.cc
@@ -1201,6 +1201,26 @@ static void icon_pcb_via (cairo_t *cr, const int width, const int height, const
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
@@ -1325,6 +1345,9 @@ ArdourWidgets::ArdourIcon::render (cairo_t *cr,
case PowerOnOff: /* unused */
icon_on_off (cr, width, height, fg_color);
break;
+ case LatencyClock: /* unused */
+ icon_latency_clock (cr, width, height, fg_color);
+ break;
case NoIcon:
rv = false;
break;
diff --git a/libs/widgets/widgets/ardour_icon.h b/libs/widgets/widgets/ardour_icon.h
index f7e58a1593..a3bd1cc675 100644
--- a/libs/widgets/widgets/ardour_icon.h
+++ b/libs/widgets/widgets/ardour_icon.h
@@ -64,6 +64,7 @@ namespace ArdourWidgets { namespace ArdourIcon {
Config,
ConfigReset,
PowerOnOff,
+ LatencyClock,
NoIcon,
};