draw: add resize for bg
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
425c8ea635
commit
fdcc507329
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue