From: Hugo Villeneuve Date: Fri, 21 Mar 2014 03:57:18 +0000 (-0400) Subject: Workaround to fill pixels past outer black rim X-Git-Tag: v1.1.0~3 X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=db858c4dc17e91500eb41cc2ba5ac2e163c4c61f;p=dockapps%2Fhvclock.git Workaround to fill pixels past outer black rim This is due to the mask for the transparent background that is not exactly of the same shape as the black rim that is drawn on the screen. --- diff --git a/src/clock.c b/src/clock.c index 14a2e21..2a98e64 100644 --- a/src/clock.c +++ b/src/clock.c @@ -139,8 +139,18 @@ draw_clock_background(GtkWidget *clock, cairo_t *cr) cairo_set_font_size(cr, radius * CLOCK_DIGITS_FONTS_SIZE_RATIO); - /* Draw clock background and outer rim */ cairo_set_line_width(cr, 1.5); + + /* + * Workaround to fill space between outer black rim and limit of transparent + * mask. + */ + cairo_set_source_rgb(cr, 0.0, 0.0, 0.0); /* Black background */ + cairo_rectangle(cr, 0, 0, 64, 64); + cairo_fill(cr); + cairo_stroke(cr); + + /* Draw clock background and outer rim */ cairo_arc(cr, center_x, center_y, radius, 0, 2 * M_PI); cairo_set_source_rgb(cr, 1.0, 1.0, 1.0); cairo_fill_preserve(cr); /* White background */