13
0

Add TailTime Icon

This commit is contained in:
Robin Gareus 2024-08-31 02:29:55 +02:00
parent 520bbfe515
commit 6d47758671
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 43 additions and 0 deletions

View File

@ -1344,6 +1344,45 @@ icon_latency_clock (cairo_t* cr, const int width, const int height, const uint32
cairo_fill (cr);
}
static void
icon_tailtime_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 d = std::min (x, y) * .4;
const double r = std::min (x, y) * .66;
const double lw = DEFAULT_LINE_WIDTH;
const double lc = fmod (lw * .5, 1.0);
const double x0 = rint (x) - lc;
const double yl = rint (y) - lc;
cairo_move_to (cr, x0, y - d);
cairo_line_to (cr, x0, y - r);
VECTORICONSTROKE (lw, fg_color);
cairo_move_to (cr, x0, y + d);
cairo_line_to (cr, x0, y + r);
VECTORICONSTROKE (lw, fg_color);
cairo_move_to (cr, x - d , yl);
cairo_line_to (cr, x - r, yl);
VECTORICONSTROKE (lw, fg_color);
cairo_move_to (cr, x + d , yl);
cairo_line_to (cr, x + r, yl);
VECTORICONSTROKE (lw, fg_color);
cairo_move_to (cr, x , y);
cairo_close_path (cr);
VECTORICONSTROKE (lw, fg_color);
cairo_arc (cr, x, y, r, 0, 2 * M_PI);
VECTORICONSTROKE (lw, fg_color);
//cairo_fill (cr);
}
static void
icon_file_folder (cairo_t* cr, const int width, const int height, const uint32_t fg_color)
{
@ -1689,6 +1728,9 @@ ArdourWidgets::ArdourIcon::render (cairo_t* cr
case TrackWaveform:
icon_waveform (cr, width, height, fg_color);
break;
case TailTimeClock:
icon_tailtime_clock (cr, width, height, fg_color);
break;
case NoIcon:
rv = false;
break;

View File

@ -77,6 +77,7 @@ namespace ArdourWidgets { namespace ArdourIcon {
Mixer,
Meters,
TrackWaveform,
TailTimeClock,
NoIcon //< Last
};