Skip to content

Commit

Permalink
Fixed clipping on text objects with borders
Browse files Browse the repository at this point in the history
  • Loading branch information
Cass committed Jul 27, 2011
1 parent 0e0631f commit 3ab9552
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clib/text.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ void text_draw(text_t *text_obj) {
int width, height;
get_extents_for_string(text_obj->text, text_obj->font, &width, &height);

layer_t *layer = create_layer(width + text_obj->border_width,
height + text_obj->border_width);
layer_t *layer = create_layer(width + 2 * text_obj->border_width,
height + 2 * text_obj->border_width);
layer_t *old_layer = text_obj->layer;
layer->x = text_obj->x - text_obj->border_width;
layer->y = text_obj->y - text_obj->border_width;
Expand Down

0 comments on commit 3ab9552

Please sign in to comment.