freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] kushal-work 87370dd 03/12: Modified LCD_V rendering


From: Kushal K S V S
Subject: [freetype2] kushal-work 87370dd 03/12: Modified LCD_V rendering
Date: Sun, 9 Jul 2017 03:50:55 -0400 (EDT)

branch: kushal-work
commit 87370ddb29373aa973619c7c277ea367ad10f520
Author: Kushal K S V S <address@hidden>
Commit: Kushal K S V S <address@hidden>

    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 fc59409..4217c3c 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);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]