more display refactoring, led bug correction

This commit is contained in:
philippe44
2020-02-24 21:54:51 -08:00
parent c8d304ff56
commit f008229acd
17 changed files with 523 additions and 156 deletions

View File

@@ -22,10 +22,11 @@
#include <stdint.h>
#include <arpa/inet.h>
#include "esp_log.h"
#include "gds_private.h"
#include "gds.h"
#include "gds_draw.h"
#include "gds_text.h"
#include "gds_private.h"
#define max(a,b) (((a) > (b)) ? (a) : (b))
@@ -109,7 +110,7 @@ bool GDS_TextLine(struct GDS_Device* Device, int N, int Pos, int Attr, char *Tex
int Y_min = max(0, Device->Lines[N].Y), Y_max = max(0, Device->Lines[N].Y + Device->Lines[N].Font->Height);
for (int c = (Attr & GDS_TEXT_CLEAR_EOL) ? X : 0; c < Device->Width; c++)
for (int y = Y_min; y < Y_max; y++)
Device->DrawPixelFast( Device, c, y, GDS_COLOR_BLACK );
GDS_DrawPixelFast( Device, c, y, GDS_COLOR_BLACK );
}
GDS_FontDrawString( Device, X, Device->Lines[N].Y, Text, GDS_COLOR_WHITE );