From fdcc5073299ec6d68a125feae516189661b3bde6 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 23 Jun 2008 18:07:47 +0200 Subject: [PATCH] draw: add resize for bg Signed-off-by: Julien Danjou --- common/draw.c | 4 +++- common/draw.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common/draw.c b/common/draw.c index 04f1ce32f..c53f89c69 100644 --- a/common/draw.c +++ b/common/draw.c @@ -228,6 +228,8 @@ draw_markup_on_element(markup_parser_data_t *p, const char *elem, break; case A_TK_ALIGN: data->bg_align = draw_align_fromstr(*values, -1); + case A_TK_RESIZE: + data->bg_resize = a_strtobool(*values, -1); default: break; } @@ -353,7 +355,7 @@ draw_text(draw_context_t *ctx, font_t *font, default: break; } - draw_image(ctx, x, y, 0, pdata->bg_image); + draw_image(ctx, x, y, area.height, pdata->bg_image); draw_image_delete(&pdata->bg_image); } diff --git a/common/draw.h b/common/draw.h index 41ed673e2..b5933f51a 100644 --- a/common/draw.h +++ b/common/draw.h @@ -168,6 +168,7 @@ typedef struct xcolor_t bg_color; draw_image_t *bg_image; alignment_t bg_align; + bool bg_resize; struct { int offset;