Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
nbgl_draw.h
Go to the documentation of this file.
1
6
7#ifndef NBGL_DRAW_H
8#define NBGL_DRAW_H
9
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16/*********************
17 * INCLUDES
18 *********************/
19#include "nbgl_types.h"
20#include "nbgl_fonts.h"
21
22/*********************
23 * DEFINES
24 *********************/
25#define QR_V4_NB_PIX_SIZE 33 // qr V4 number of pixels
26#define QR_V10_NB_PIX_SIZE 57 // qr V10 number of pixels
27#define QR_MAX_PIX_SIZE QR_V10_NB_PIX_SIZE // we support up to V10 qr code version
28
29/**********************
30 * TYPEDEFS
31 **********************/
32
33// Structure used to hold character information
34typedef struct {
35 uint32_t unicode;
36 const uint8_t *buffer;
37 const uint8_t *patterns;
38 uint16_t byte_cnt;
39 int16_t x_min;
40 int16_t y_min;
41 int16_t x_max;
42 int16_t y_max;
43 uint16_t width;
44 uint16_t height;
45 int16_t real_y_min;
46 uint16_t real_height;
47 uint8_t encoding;
51
53
54/**********************
55 * GLOBAL PROTOTYPES
56 **********************/
57
59 nbgl_transformation_t transformation,
60 nbgl_color_map_t color_map,
61 const nbgl_icon_details_t *icon);
62void nbgl_drawRoundedRect(const nbgl_area_t *area, nbgl_radius_t radius, color_t innerColor);
64 nbgl_radius_t radius,
65 uint8_t stroke,
66 color_t innerColor,
67 color_t borderColor);
69 const char *text,
70 uint16_t textLen,
71 nbgl_font_id_e fontId,
72 color_t fontColor);
75 const char *text,
76 color_t backgroundColor);
77
78/**********************
79 * MACROS
80 **********************/
81
82#ifdef __cplusplus
83} /* extern "C" */
84#endif
85
86#endif /* NBGL_DRAW_H */
void nbgl_drawIcon(nbgl_area_t *area, nbgl_transformation_t transformation, nbgl_color_map_t color_map, const nbgl_icon_details_t *icon)
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)
void nbgl_drawRoundedBorderedRect(const nbgl_area_t *area, nbgl_radius_t radius, uint8_t stroke, color_t innerColor, color_t borderColor)
void nbgl_drawQrCode(const nbgl_area_t *area, nbgl_qrcode_version_t version, const char *text, color_t backgroundColor)
void nbgl_drawRoundedRect(const nbgl_area_t *area, nbgl_radius_t radius, color_t innerColor)
nbgl_font_id_e
Definition nbgl_fonts.h:143
Included by every low-level NBGL header, to forbid them in apollo app code.
common types for Graphical Library
color_t
Definition nbgl_types.h:153
uint8_t nbgl_transformation_t
Represents the transformation to be applied on the bitmap before rendering This is a bitfield using m...
Definition nbgl_types.h:395
uint8_t nbgl_color_map_t
Represents the color_map to be used for 2BPP image, or the foreground color for 1BPP image.
Definition nbgl_types.h:402
nbgl_radius_t
possible radius indexes for objects
Definition nbgl_types.h:375
nbgl_qrcode_version_t
possible modes for QR Code
Definition nbgl_types.h:242
struct PACKED__ nbgl_icon_details_s nbgl_icon_details_t
Represents all information about an icon.
struct PACKED__ nbgl_area_s nbgl_area_t
Represents a rectangle area of the screen.
const uint8_t * buffer
Definition nbgl_draw.h:36
const uint8_t * patterns
Definition nbgl_draw.h:37
uint32_t unicode
Definition nbgl_draw.h:35
uint16_t real_height
Definition nbgl_draw.h:46
int16_t real_y_min
Definition nbgl_draw.h:45
uint8_t encoding
Definition nbgl_draw.h:47
uint16_t byte_cnt
Definition nbgl_draw.h:38
uint8_t nb_skipped_bytes
Definition nbgl_draw.h:48
uint16_t width
Definition nbgl_draw.h:43
uint16_t height
Definition nbgl_draw.h:44