commit 283706c74fe42d3d9dbda973ce907949cd753dcf
parent 1490f040bf099d4a1388969e6f47dde88d0ebcf8
Author: Frederic Cambus <fred@statdns.com>
Date: Sat, 13 May 2017 22:59:07 +0200
Fix wrong substitution order
Diffstat:
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/ansilove.c b/src/ansilove.c
@@ -13,23 +13,23 @@
// shared method for drawing characters
void drawchar(gdImagePtr im, const unsigned char *font_data, int32_t bits,
- int32_t height, int32_t row, int32_t column,
+ int32_t height, int32_t column, int32_t row,
int32_t background, int32_t foreground, unsigned char character)
{
int32_t x, y;
- gdImageFilledRectangle(im, row * bits, column*height, row * bits +
- bits - 1, column * height + height - 1, background);
+ gdImageFilledRectangle(im, column * bits, row*height, column * bits +
+ bits - 1, row * height + height - 1, background);
for (y = 0; y < height; y++) {
for (x = 0; x < bits; x++) {
if ((font_data[y+character*height] & (0x80 >> x)) != 0) {
- gdImageSetPixel(im, row * bits + x, column*height + y, foreground);
+ gdImageSetPixel(im, column * bits + x, row*height + y, foreground);
if (bits==9 && x==7 && character > 191 && character < 224)
{
- gdImageSetPixel(im, row * bits + 8, column * height + y, foreground);
+ gdImageSetPixel(im, column * bits + 8, row * height + y, foreground);
}
}
}
diff --git a/src/ansilove.h b/src/ansilove.h
@@ -31,7 +31,7 @@
// prototypes
void drawchar(gdImagePtr im, const unsigned char *font_data, int32_t bits,
- int32_t height, int32_t position_x, int32_t position_y,
+ int32_t height, int32_t column, int32_t row,
int32_t background, int32_t foreground, unsigned char character);
#endif