Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
nbgl_draw.h
Go to the documentation of this file.
1
7#ifndef NBGL_DRAW_H
8#define NBGL_DRAW_H
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14/*********************
15 * INCLUDES
16 *********************/
17#include "nbgl_types.h"
18#include "nbgl_fonts.h"
19
20/*********************
21 * DEFINES
22 *********************/
23#define QR_V4_NB_PIX_SIZE 33 // qr V4 number of pixels
24#define QR_V10_NB_PIX_SIZE 57 // qr V10 number of pixels
25#define QR_MAX_PIX_SIZE QR_V10_NB_PIX_SIZE // we support up to V10 qr code version
26
27/**********************
28 * TYPEDEFS
29 **********************/
30
31/**********************
32 * GLOBAL PROTOTYPES
33 **********************/
34
35void nbgl_drawIcon(nbgl_area_t *area,
36 nbgl_transformation_t transformation,
37 nbgl_color_map_t color_map,
38 const nbgl_icon_details_t *icon);
39void nbgl_drawRoundedRect(const nbgl_area_t *area, nbgl_radius_t radius, color_t innerColor);
41 nbgl_radius_t radius,
42 uint8_t stroke,
43 color_t innerColor,
44 color_t borderColor);
46 const char *text,
47 uint16_t textLen,
48 nbgl_font_id_e fontId,
49 color_t fontColor);
50void nbgl_drawQrCode(const nbgl_area_t *area,
52 const char *text,
53 color_t backgroundColor);
54
55/**********************
56 * MACROS
57 **********************/
58
59#ifdef __cplusplus
60} /* extern "C" */
61#endif
62
63#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)
Helper function to render an icon directly from its nbgl_icon_details_t structure.
Definition nbgl_draw.c:489
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.
Definition nbgl_draw.c:538
void nbgl_drawRoundedBorderedRect(const nbgl_area_t *area, nbgl_radius_t radius, uint8_t stroke, color_t innerColor, color_t borderColor)
This functions draws a rounded corners rectangle with a border, with the given parameters.
Definition nbgl_draw.c:331
void nbgl_drawQrCode(const nbgl_area_t *area, nbgl_qrcode_version_t version, const char *text, color_t backgroundColor)
Draws the given text into a V10 QR code (QR code version is fixed using qrcodegen_VERSION_MIN/qrcodeg...
Definition nbgl_draw.c:764
void nbgl_drawRoundedRect(const nbgl_area_t *area, nbgl_radius_t radius, color_t innerColor)
This functions draws a rounded corners rectangle (without border), with the given parameters.
Definition nbgl_draw.c:249
nbgl_font_id_e
Definition nbgl_fonts.h:136
common types for Graphical Library
color_t
Definition nbgl_types.h:120
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:362
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:369
nbgl_radius_t
possible radius indexes for objects
Definition nbgl_types.h:343
nbgl_qrcode_version_t
possible modes for QR Code
Definition nbgl_types.h:209
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.
unsigned short uint16_t
Definition usbd_conf.h:54
unsigned char uint8_t
Definition usbd_conf.h:53