Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
Classes | Macros | Functions
nbgl_draw_text.c File Reference

Implementation of middle-level API to draw text. More...

#include <string.h>
#include "nbgl_front.h"
#include "nbgl_draw.h"
#include "nbgl_fonts.h"
#include "nbgl_debug.h"
#include "nbgl_side.h"
#include "os_pic.h"
#include "os_utils.h"
Include dependency graph for nbgl_draw_text.c:

Go to the source code of this file.

Classes

struct  character_info_t
 
struct  rle_context_t
 

Macros

#define MAX_FONT_HEIGHT   54
 
#define AVERAGE_CHAR_WIDTH   40
 
#define COMBINED_HEIGHT   9
 
#define MAX_RLE_COPY_PIXELS   6
 

Functions

nbgl_font_id_e nbgl_drawText (const nbgl_area_t *area, const char *text, uint16_t textLen, nbgl_font_id_e fontId, color_t fontColor)
 This function draws the given single-line text, with the given parameters.
 

Detailed Description

Implementation of middle-level API to draw text.

Definition in file nbgl_draw_text.c.

Macro Definition Documentation

◆ AVERAGE_CHAR_WIDTH

#define AVERAGE_CHAR_WIDTH   40

Definition at line 28 of file nbgl_draw_text.c.

◆ COMBINED_HEIGHT

#define COMBINED_HEIGHT   9

Definition at line 35 of file nbgl_draw_text.c.

◆ MAX_FONT_HEIGHT

#define MAX_FONT_HEIGHT   54

Definition at line 27 of file nbgl_draw_text.c.

◆ MAX_RLE_COPY_PIXELS

#define MAX_RLE_COPY_PIXELS   6

Definition at line 38 of file nbgl_draw_text.c.

Function Documentation

◆ nbgl_drawText()

nbgl_font_id_e nbgl_drawText ( const nbgl_area_t area,
const char *  text,
uint16_t  textLen,
nbgl_font_id_e  fontId,
color_t  fontColor 
)

This function draws the given single-line text, with the given parameters.

Parameters
areaposition, size and background color to use for text
textarray of characters (UTF-8)
textLennumber of chars to draw
fontIdfont to be used
fontColorcolor to use for font

Definition at line 918 of file nbgl_draw_text.c.