freetype-commit
[Top][All Lists]
Advanced

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

[freetype2-demos] master 195908f 2/2: * src/ftmulti.c (Init_Display): Us


From: Werner Lemberg
Subject: [freetype2-demos] master 195908f 2/2: * src/ftmulti.c (Init_Display): Use automatic color depth.
Date: Sat, 11 Feb 2023 09:49:41 -0500 (EST)

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

    * src/ftmulti.c (Init_Display): Use automatic color depth.
---
 src/ftmulti.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/ftmulti.c b/src/ftmulti.c
index 54bbd60..de05802 100644
--- a/src/ftmulti.c
+++ b/src/ftmulti.c
@@ -99,7 +99,7 @@
 
   static int  res       = 72;
 
-  static grColor  fore_color = { 255 };
+  static grColor  fore_color;
 
   static int  Fail;
 
@@ -293,7 +293,7 @@
   static void
   Init_Display( void )
   {
-    grBitmap  bitmap = { height, width, 0, gr_pixel_mode_gray, 256, NULL };
+    grBitmap  bitmap = { height, width, 0, gr_pixel_mode_none, 256, NULL };
 
 
     grInitDevices();
@@ -304,6 +304,8 @@
 
     bit = (grBitmap*)surface;
 
+    fore_color = grFindColor( bit, 255, 255, 255, 255 );  /* white */
+
     graph_init = 1;
   }
 



reply via email to

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