draw: add resize for bg

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-06-23 18:07:47 +02:00
parent 425c8ea635
commit fdcc507329
2 changed files with 4 additions and 1 deletions

View File

@ -228,6 +228,8 @@ draw_markup_on_element(markup_parser_data_t *p, const char *elem,
break; break;
case A_TK_ALIGN: case A_TK_ALIGN:
data->bg_align = draw_align_fromstr(*values, -1); data->bg_align = draw_align_fromstr(*values, -1);
case A_TK_RESIZE:
data->bg_resize = a_strtobool(*values, -1);
default: default:
break; break;
} }
@ -353,7 +355,7 @@ draw_text(draw_context_t *ctx, font_t *font,
default: default:
break; 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); draw_image_delete(&pdata->bg_image);
} }

View File

@ -168,6 +168,7 @@ typedef struct
xcolor_t bg_color; xcolor_t bg_color;
draw_image_t *bg_image; draw_image_t *bg_image;
alignment_t bg_align; alignment_t bg_align;
bool bg_resize;
struct struct
{ {
int offset; int offset;