libansilove

Library for converting ANSI, ASCII, and other formats to PNG
Log | Files | Refs | README | LICENSE

commit 71b7e325f0fdd79194397760dc7bbc996c3286ef
parent 8761d27d94d7043c10d61fada4c374190ea6edcd
Author: Frederic Cambus <fred@statdns.com>
Date:   Fri, 25 Sep 2020 21:10:23 +0200

Refactor calls to drawchar() in the ANSI loader.

Diffstat:
Msrc/loaders/ansi.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/loaders/ansi.c b/src/loaders/ansi.c @@ -505,19 +505,19 @@ ansilove_ansi(struct ansilove_ctx *ctx, struct ansilove_options *options) row = ansi_buffer[loop].row; if (ced) { - drawchar(canvas, fontData.font_data, options->bits, fontData.height, - column, row, ced_background, ced_foreground, character); + background = ced_background; + foreground = ced_foreground; } else { if (background < 16) background = colors[background]; if (foreground < 16) foreground = colors[foreground]; - - drawchar(canvas, fontData.font_data, options->bits, fontData.height, - column, row, background, foreground, character); } + drawchar(canvas, fontData.font_data, options->bits, + fontData.height, column, row, background, foreground, + character); } /* create output image */