summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-01-18 15:33:09 +0000
committerThomas White <taw@physics.org>2020-01-18 15:33:09 +0000
commit82b7108e025973caafa75c998862324eacc26838 (patch)
treeb8b6c31e44d166fe07228da7ed451ca341853169
parent8a92db0554cb6ab44d2d77c6cfd0b30907ceeb69 (diff)
Clock size and position for show
-rw-r--r--glitchyclock.c16
1 files 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);