freetype-commit
[Top][All Lists]
Advanced

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

[freetype2-demos] master b7883d3: [ftview] Use green empty boxes instead


From: Werner Lemberg
Subject: [freetype2-demos] master b7883d3: [ftview] Use green empty boxes instead.
Date: Fri, 21 Apr 2023 09:43:14 -0400 (EDT)

branch: master
commit b7883d36d0d0078bba9521a316eea0926ad3cae0
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>

    [ftview] Use green empty boxes instead.
    
    * src/ftview.c (status): Store green color.
    (main): Initialize it.
    (Render_*): Use it.
---
 src/ftview.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/ftview.c b/src/ftview.c
index 5129639..3b74ba2 100644
--- a/src/ftview.c
+++ b/src/ftview.c
@@ -91,6 +91,7 @@
     const char*    dims;
     const char*    device;
     int            render_mode;
+    grColor        green;
 
     int            res;
     int            ptsize;            /* current point size, 26.6 format */
@@ -111,7 +112,7 @@
     unsigned char  filter_weights[5];
     int            fw_idx;
 
-  } status = { "", DIM, NULL, RENDER_MODE_ALL,
+  } status = { "", DIM, NULL, RENDER_MODE_ALL, { 0 },
                72, 48, 1, 0.04, 0.04, 0.02, 0.22,
                0, 0, 0, 0, 0, 0,
                FT_LCD_FILTER_DEFAULT, { 0x08, 0x4D, 0x56, 0x4D, 0x08 }, 2 };
@@ -243,7 +244,7 @@
       if ( slot->advance.x == 0 )
       {
         grFillRect( display->bitmap, x, y - width, width, width,
-                    display->warn_color );
+                    status.green );
         x += width;
       }
 
@@ -386,7 +387,7 @@
       if ( slot->advance.x == 0 )
       {
         grFillRect( display->bitmap, x, y - width, width, width,
-                    display->warn_color );
+                    status.green );
         x += width;
       }
 
@@ -574,7 +575,7 @@
       if ( slot->advance.x == 0 )
       {
         grFillRect( display->bitmap, x, y - width, width, width,
-                    display->warn_color );
+                    status.green );
         x += width;
       }
 
@@ -1829,6 +1830,8 @@
 
     FTDemo_Icon( handle, display );
 
+    status.green = grFindColor( display->bitmap, 128, 255, 128, 255 );
+
     event_font_change( 0 );
 
     do



reply via email to

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