summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-07-17 21:07:25 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-07-17 21:07:25 (EDT)
commitde936a72906d75ab24f818f0b9a9a11e4d23e428 (patch)
tree517b1460a31e64f0b81b2943b05e8e2e675634f6 /src
parent7c70f1b831fd61e71efea1f4a3e264a0fa303131 (diff)
text_render(): Fill to end of each line
Diffstat (limited to 'src')
-rw-r--r--src/text.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/text.c b/src/text.c
index 10996c5..b9a0afb 100644
--- a/src/text.c
+++ b/src/text.c
@@ -116,6 +116,9 @@ text_render(struct text *text, struct font *font, png_bytepp rows)
++string;
}
} else if (*string == '\n') {
+ for (; col < text->width; ++col) {
+ font_render(font, &fg,&bg, ' ', rows, row, col);
+ }
col = 0;
++row;
++string;
@@ -125,6 +128,9 @@ text_render(struct text *text, struct font *font, png_bytepp rows)
++string;
}
}
+ for (; col < text->width; ++col) {
+ font_render(font, &fg, &bg, ' ', rows, row, col);
+ }
}
struct text *