From 82b7108e025973caafa75c998862324eacc26838 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 18 Jan 2020 15:33:09 +0000 Subject: Clock size and position for show --- glitchyclock.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/glitchyclock.c b/glitchyclock.c index f2e5809..8b3ca90 100644 --- a/glitchyclock.c +++ b/glitchyclock.c @@ -120,7 +120,7 @@ static gboolean draw_sig(GtkWidget *widget, cairo_t *cr, struct glitchyclock *gc int lw, lh; double sf; PangoLayout *layout; - const double screen_w_frac = 0.4; + const double screen_w_frac = 0.2; char timestr[64]; double seconds_elapsed, seconds_rounded; double real_seconds_elapsed, real_seconds_rounded; @@ -155,7 +155,7 @@ static gboolean draw_sig(GtkWidget *widget, cairo_t *cr, struct glitchyclock *gc clock_minutes = clock_minutes % 60; clock_hours = clock_hours % 24; - snprintf(timestr, 63, "%02i%c%02i%c%02i", clock_hours, col, clock_minutes, col, clock_seconds); + snprintf(timestr, 63, "%02i%c%02i", clock_hours, ':', clock_minutes); if ( cues[gc->cue].type == FADE_IN ) { gc->brightness = seconds_elapsed / cues[gc->cue].parameter; @@ -165,7 +165,7 @@ static gboolean draw_sig(GtkWidget *widget, cairo_t *cr, struct glitchyclock *gc if ( cues[gc->cue].type == FADE_IN_FROZEN ) { gc->brightness = seconds_elapsed / cues[gc->cue].parameter; if ( gc->brightness > 1.0 ) gc->brightness = 1.0; - strcpy(timestr, "88:v8:68"); + strcpy(timestr, "88:68"); } if ( cues[gc->cue].type == BLACKOUT ) { @@ -176,7 +176,7 @@ static gboolean draw_sig(GtkWidget *widget, cairo_t *cr, struct glitchyclock *gc if ( cues[gc->cue].type == BLACKOUT_FROZEN ) { gc->brightness = 1.0 - (seconds_elapsed / cues[gc->cue].parameter); if ( gc->brightness < 0.0 ) gc->brightness = 0.0; - strcpy(timestr, "88:v8:68"); + strcpy(timestr, "88:68"); } if ( (cues[gc->cue].type == GLITCH) @@ -211,13 +211,13 @@ static gboolean draw_sig(GtkWidget *widget, cairo_t *cr, struct glitchyclock *gc if ( glitch ) { if ( fmod(seconds_elapsed, 0.05) > duty*0.05 ) { - strcpy(timestr, "00:rK:c1"); + strcpy(timestr, "00:c1"); } else { - strcpy(timestr, "88:v8:68"); + strcpy(timestr, "vL:68"); } } - pango_layout_set_text(layout, "88:88:88", -1); + pango_layout_set_text(layout, "88:88", -1); pango_cairo_update_layout(cr, layout); pango_layout_get_size(layout, &lw, &lh); @@ -229,7 +229,7 @@ static gboolean draw_sig(GtkWidget *widget, cairo_t *cr, struct glitchyclock *gc pango_layout_get_size(layout, &lw, &lh); lw /= PANGO_SCALE; lh /= PANGO_SCALE; w /= sf; h /= sf; - cairo_translate(cr, (w-lw)/2.0, h-lh-2.0); + cairo_translate(cr, (w-lw)/2.0, h-lh-5*lh); pango_cairo_update_layout(cr, layout); cairo_set_source_rgb(cr, gc->brightness*0.10, 0.0, 0.0); -- cgit v1.2.3