From 7fed1428c65716e1aa54f0c9ce7b33b1b1460612 Mon Sep 17 00:00:00 2001 From: Cassandra Date: Sun, 25 Mar 2018 13:23:52 -0400 Subject: [PATCH] initial text shadowing --- unlock_indicator.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/unlock_indicator.c b/unlock_indicator.c index 64747d5..d66c155 100644 --- a/unlock_indicator.c +++ b/unlock_indicator.c @@ -298,7 +298,14 @@ static void draw_text(cairo_t *ctx, text_t text) { x = text.x - ((extents.width / 2) + (extents.x_bearing / 2)); break; } - + + // text shadowing - each text object should get its own specifiable shadow color + // (defaults to #00000000 so that it's invisible) + // as well as shadow-offset or something + cairo_set_source_rgba(ctx, 0.0, 0.0, 0.0, text.color.alpha); + cairo_move_to(ctx, x+1, text.y+1); + cairo_show_text(ctx, text.str); + cairo_set_source_rgba(ctx, text.color.red, text.color.green, text.color.blue, text.color.alpha); cairo_move_to(ctx, x, text.y); cairo_show_text(ctx, text.str);