From 1c9a908a8f727c8241b3468415e912506b93b901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 26 Dec 2018 15:31:49 +0100 Subject: [PATCH] particle/string: draw decoration, if available --- particles/string.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/particles/string.c b/particles/string.c index b7f389a..2d1f581 100644 --- a/particles/string.c +++ b/particles/string.c @@ -46,6 +46,14 @@ expose(const struct exposable *exposable, cairo_t *cr, int x, int y, int height) e->text, strlen(e->text), &glyphs, &num_glyphs, &clusters, &num_clusters, &cluster_flags); + const struct deco *deco = exposable->particle->deco; + if (deco != NULL) { + int width = (exposable->particle->left_margin + + extents.x_advance + + exposable->particle->right_margin); + deco->expose(deco, cr, x, y, width, height); + } + cairo_set_source_rgba(cr, e->foreground.red, e->foreground.green, @@ -59,6 +67,7 @@ expose(const struct exposable *exposable, cairo_t *cr, int x, int y, int height) cairo_glyph_free(glyphs); cairo_text_cluster_free(clusters); /*cairo_scaled_font_destroy(scaled);*/ + } static void