text.c File Reference
Text graphic routines. More...
#include <gfx/gfx.h>
#include <gfx/font.h>
#include <gfx/text.h>
#include <gfx/gfx_p.h>
#include <cfg/debug.h>
Go to the source code of this file.
Functions | |
| void | text_setCoord (struct Bitmap *bm, int x, int y) |
| Move (imaginary) cursor to coordinates specified. | |
| void | text_moveTo (struct Bitmap *bm, int row, int col) |
| Move (imaginary) cursor to column and row specified. | |
| static int | text_putglyph (char c, struct Bitmap *bm) |
| Render char c on Bitmap bm. | |
| int | text_putchar (char c, struct Bitmap *bm) |
Render char c, with (currently) limited ANSI escapes emulation support and '' for newline. | |
| void | text_clear (struct Bitmap *bmp) |
| Clear the screen and reset cursor position. | |
| uint8_t | text_style (struct Bitmap *bm, uint8_t flags, uint8_t mask) |
| Set/clear algorithmic font style bits. | |
Variables | |
| static bool | ansi_mode = false |
| ANSI escape sequences flag: true for ESC state on. | |
Detailed Description
Text graphic routines.
- Version:
- Id
- text.c 2506 2009-04-15 08:29:07Z duplo
Definition in file text.c.
Function Documentation
| void text_moveTo | ( | struct Bitmap * | bm, | |
| int | row, | |||
| int | col | |||
| ) |
| uint8_t text_style | ( | struct Bitmap * | bm, | |
| uint8_t | flags, | |||
| uint8_t | mask | |||
| ) |
Set/clear algorithmic font style bits.
- Parameters:
-
bm Pointer to Bitmap to affect. flags Style flags to set mask Mask of flags to modify
- Returns:
- Old style flags
text_style(bm, STYLEF_BOLD, STYLEF_BOLD);
Turn off bold and turn on italic, leave others as they are
text_style(bm, STYLEF_ITALIC, STYLEF_BOLD | STYLEF_ITALIC);
Query current style without chaning it
style = text_style(bm, 0, 0);
Reset all styles (plain text)
text_style(bm, 0, STYLE_MASK);
Variable Documentation
bool ansi_mode = false [static] |
