|
Embedded SDK
Embedded SDK
|
Implementation of middle-level API to draw rich forms like rounded rectangle. More...
#include <string.h>#include "nbgl_front.h"#include "nbgl_draw.h"#include "nbgl_debug.h"#include "nbgl_side.h"#include "qrcodegen.h"#include "glyphs.h"#include "os_pic.h"#include "os_utils.h"#include "os_helpers.h"
Go to the source code of this file.
Classes | |
| struct | QrCodeBuffer_t |
| struct | radiusIcons_t |
Macros | |
| #define | QR_PIXEL_WIDTH_HEIGHT 4 |
| #define | qrcode ((QrCodeBuffer_t *) ramBuffer)->qrcode |
| #define | tempBuffer ((QrCodeBuffer_t *) ramBuffer)->tempBuffer |
| #define | QrDrawBuffer ((QrCodeBuffer_t *) ramBuffer)->QrDrawBuffer |
Enumerations | |
| enum | half_t { LEFT_HALF , RIGHT_HALF } |
Functions | |
| CCASSERT (qr_code_buffer, sizeof(QrCodeBuffer_t)<=GZLIB_UNCOMPRESSED_CHUNK) | |
| void | nbgl_drawRoundedRect (const nbgl_area_t *area, nbgl_radius_t radiusIndex, color_t innerColor) |
| This functions draws a rounded corners rectangle (without border), with the given parameters. | |
| void | nbgl_drawRoundedBorderedRect (const nbgl_area_t *area, nbgl_radius_t radiusIndex, uint8_t stroke, color_t innerColor, color_t borderColor) |
| This functions draws a rounded corners rectangle with a border, with the given parameters. | |
| 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. | |
| void | nbgl_drawQrCode (const nbgl_area_t *area, nbgl_qrcode_version_t version, const char *text, color_t foregroundColor) |
| Draws the given text into a V10 QR code (QR code version is fixed using qrcodegen_VERSION_MIN/qrcodegen_VERSION_MAX in qrcodegen.h) | |
Implementation of middle-level API to draw rich forms like rounded rectangle.
Definition in file nbgl_draw.c.
| #define QR_PIXEL_WIDTH_HEIGHT 4 |
Definition at line 41 of file nbgl_draw.c.
| #define qrcode ((QrCodeBuffer_t *) ramBuffer)->qrcode |
Definition at line 53 of file nbgl_draw.c.
| #define QrDrawBuffer ((QrCodeBuffer_t *) ramBuffer)->QrDrawBuffer |
Definition at line 55 of file nbgl_draw.c.
| #define tempBuffer ((QrCodeBuffer_t *) ramBuffer)->tempBuffer |
Definition at line 54 of file nbgl_draw.c.
| enum half_t |
| Enumerator | |
|---|---|
| LEFT_HALF | |
| RIGHT_HALF | |
Definition at line 28 of file nbgl_draw.c.
| CCASSERT | ( | qr_code_buffer | , |
| sizeof(QrCodeBuffer_t)<= | GZLIB_UNCOMPRESSED_CHUNK | ||
| ) |
| 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.
The icon is rendered whether it's an image file or not. No transformation is applied to the icon.
| area | Area of drawing |
| transformation | Transformation to apply to this icon (only available for raw image, not image file) |
| color_map | Color map applied to icon |
| icon | Icon details structure to draw |
Definition at line 538 of file nbgl_draw.c.
| void nbgl_drawQrCode | ( | const nbgl_area_t * | area, |
| nbgl_qrcode_version_t | version, | ||
| const char * | text, | ||
| color_t | foregroundColor | ||
| ) |
Draws the given text into a V10 QR code (QR code version is fixed using qrcodegen_VERSION_MIN/qrcodegen_VERSION_MAX in qrcodegen.h)
| area | position, size and color of the QR code to draw |
| version | version of QR Code |
| text | text to encode |
| foregroundColor | color to be applied to the 1's in QR code |
Definition at line 663 of file nbgl_draw.c.
| void nbgl_drawRoundedBorderedRect | ( | const nbgl_area_t * | area, |
| nbgl_radius_t | radiusIndex, | ||
| uint8_t | stroke, | ||
| color_t | innerColor, | ||
| color_t | borderColor | ||
| ) |
This functions draws a rounded corners rectangle with a border, with the given parameters.
| area | position, size and background color (outside of the rectangle) to use for the rectangle |
| radiusIndex | radius size |
| stroke | thickness of border (fixed to 2) |
| innerColor | color to use for inside the rectangle |
| borderColor | color to use for the border |
Definition at line 372 of file nbgl_draw.c.
| void nbgl_drawRoundedRect | ( | const nbgl_area_t * | area, |
| nbgl_radius_t | radiusIndex, | ||
| color_t | innerColor | ||
| ) |
This functions draws a rounded corners rectangle (without border), with the given parameters.
| area | position, size and background color (outside of the rectangle) to use for the rectangle |
| radiusIndex | radius size |
| innerColor | color to use for inside the rectangle |
Definition at line 273 of file nbgl_draw.c.