[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2-demos] master 17a67f3: * graph/grfont.c (grGotobitmap): Initi
From: |
Alexei Podtelezhnikov |
Subject: |
[freetype2-demos] master 17a67f3: * graph/grfont.c (grGotobitmap): Initialize color here... |
Date: |
Thu, 5 Jul 2018 22:16:18 -0400 (EDT) |
branch: master
commit 17a67f3ec800815ddbe85d39bf7d8246ae81021b
Author: Alexei Podtelezhnikov <address@hidden>
Commit: Alexei Podtelezhnikov <address@hidden>
* graph/grfont.c (grGotobitmap): Initialize color here...
(grWrite): ... instead of here.
---
ChangeLog | 5 +++++
graph/grfont.c | 8 +++-----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 664ee80..00f2cef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-05 Alexei Podtelezhnikov <address@hidden>
+
+ * graph/grfont.c (grGotobitmap): Initialize color here...
+ (grWrite): ... instead of here.
+
2018-07-03 Alexei Podtelezhnikov <address@hidden>
[ftstring] Implement waterfall as mode 2.
diff --git a/graph/grfont.c b/graph/grfont.c
index 50ed47e..5f5af56 100644
--- a/graph/grfont.c
+++ b/graph/grfont.c
@@ -314,6 +314,7 @@
static int gr_cursor_y = 0;
static int gr_line_height = 8;
static grBitmap* gr_text_bitmap = 0;
+ static grColor gr_color = { 0 };
static int gr_margin_right = 0;
static int gr_margin_top = 0;
@@ -322,6 +323,7 @@
grGotobitmap( grBitmap* bitmap )
{
gr_text_bitmap = bitmap;
+ gr_color = grFindColor( bitmap, 100, 100, 100, 255 );
}
@@ -364,15 +366,11 @@
{
if ( string )
{
- grColor color;
-
-
- color.value = 127;
grWriteCellString( gr_text_bitmap,
gr_margin_right + ( gr_cursor_x << 3 ),
gr_margin_top + gr_cursor_y * gr_line_height,
string,
- color );
+ gr_color );
gr_cursor_x += strlen( string );
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2-demos] master 17a67f3: * graph/grfont.c (grGotobitmap): Initialize color here...,
Alexei Podtelezhnikov <=