From 4caeea2cd6556ac0bbd166ce6fb9094fd93877f6 Mon Sep 17 00:00:00 2001 From: Kushal K S V S Date: Thu, 15 Jun 2017 15:06:44 +0530 Subject: [PATCH] Modified LCD_V rendering --- tests/make_bitmap/bitmap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/make_bitmap/bitmap.c b/tests/make_bitmap/bitmap.c index fc5940935..4217c3c16 100644 --- a/tests/make_bitmap/bitmap.c +++ b/tests/make_bitmap/bitmap.c @@ -160,13 +160,13 @@ void Write_Bitmap_Data_LCD_V_BGR (FT_Bitmap * bitmap) { int i,j,k,step; char value; - step = bitmap->rows - 1; + step = 0; - while ( step > 0 ){ + while ( step < bitmap->rows ){ for (i = 0; i < bitmap->width; i++) { - for (j = step - 2; j <= step; ++j) + for (j = step ; j < step + 3; ++j) { value = 0xff - bitmap->buffer[(j * bitmap->pitch) + i]; fwrite (&value, 1, 1,fp); @@ -177,7 +177,7 @@ void Write_Bitmap_Data_LCD_V_BGR (FT_Bitmap * bitmap) { value = 0xff; fwrite (&value, 1, 1,fp); } - step = step - 3; + step = step + 3; // Jumping 3 rows up } fclose(fp); @@ -189,13 +189,13 @@ void Write_Bitmap_Data_LCD_V_RGB (FT_Bitmap * bitmap) { int i,j,k,step; char value; - step = bitmap->rows - 1; + step = 0; - while ( step > 0 ){ + while ( step < bitmap->rows ){ for (i = 0; i < bitmap->width; i++) { - for (j = step; j > step - 3; --j) + for (j = step + 2 ; j >= step; --j) { value = 0xff - bitmap->buffer[(j * bitmap->pitch) + i]; fwrite (&value, 1, 1,fp); @@ -206,7 +206,7 @@ void Write_Bitmap_Data_LCD_V_RGB (FT_Bitmap * bitmap) { value = 0xff; fwrite (&value, 1, 1,fp); } - step = step - 3; + step = step + 3; // Jumping 3 rows up } fclose(fp);