A basic graphics package for the LPC4088 Display Module.
Dependents: lpc4088_displaymodule_demo_sphere sampleGUI sampleEmptyGUI lpc4088_displaymodule_fs_aid ... more
Fork of DMBasicGUI by
Diff: lpc_swim/lpc_swim.c
- Revision:
- 17:6e2abf107800
- Parent:
- 0:4977187e90c7
diff -r feb669462368 -r 6e2abf107800 lpc_swim/lpc_swim.c --- a/lpc_swim/lpc_swim.c Mon Mar 09 14:24:54 2015 +0000 +++ b/lpc_swim/lpc_swim.c Fri Mar 20 14:25:46 2015 +0100 @@ -37,6 +37,8 @@ * Private types/enumerations/variables ****************************************************************************/ +static const FONT_T* defaultFont = (FONT_T*)&font_helvr10; + /***************************************************************************** * Public types/enumerations/variables ****************************************************************************/ @@ -184,7 +186,7 @@ } /* Use the default font and make background transparent */ - win->font = (FONT_T *) &font_helvr10; + win->font = (FONT_T*)defaultFont; /* Set starting text position in upper left of window */ win->xvpos = win->xpvmin; @@ -579,6 +581,12 @@ win->bkg = bkg_color; } +/* Sets the font to be used for all new windows */ +void swim_set_default_font(const FONT_T* def_font) +{ + defaultFont = def_font; +} + /* Get the virtual window horizontal size */ int32_t swim_get_horizontal_size(SWIM_WINDOW_T *win) {