mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-10-17 10:55:06 +00:00
app-module: - Implement `AppStartContext` to reduce amount of `app_start_` and `app_exec` functions: replace them with `app_start_with_context()` - Add support for environment variables when starting apps - Implement support for environment variables for apps graphics-module: - Add this new module - Move font-module code into this module - Implement pixel_buffer apps: - Terminal app: reduce memory usage by only buffering a single row of characters, and try to buffer in IRAM when possible. Implement new pixel_buffer. - App List: Mark apps as favourite to pin them on top. Use touch or press "x" key. - App List: Add toolbar button that shows alert dialog with info about using favourites
44 lines
1.2 KiB
C
44 lines
1.2 KiB
C
// SPDX-License-Identifier: Apache-2.0
|
|
#pragma once
|
|
|
|
#include <font/font.h>
|
|
#include <graphics/pixel_buffer.h>
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* @brief Renders one character's glyph into a PixelBuffer, in whatever pixel format it holds.
|
|
*
|
|
* The glyph occupies a font->glyph_width x font->glyph_height box at (x, y). A character outside
|
|
* [first_codepoint, last_codepoint] renders as a space.
|
|
*
|
|
* @param[out] buffer destination, in any pixel format
|
|
* @param[in] x pixel x of the glyph's top-left corner
|
|
* @param[in] y pixel y of the glyph's top-left corner
|
|
* @param[in] font the font to render with
|
|
* @param[in] character the character to render
|
|
* @param[in] fgColor colour for covered glyph pixels, as RGB565
|
|
* @param[in] bgColor colour for uncovered glyph pixels, as RGB565
|
|
* @param[in] conversion how fg/bg reduce into buffer's native format where that's ambiguous (see
|
|
* PixelBufferConversion)
|
|
*/
|
|
void font_render_char_pixel_buffer_rgb565(
|
|
struct PixelBuffer* buffer,
|
|
int x,
|
|
int y,
|
|
const FixedWidthFont* font,
|
|
char character,
|
|
uint16_t fgColor,
|
|
uint16_t bgColor,
|
|
enum PixelBufferConversion conversion
|
|
);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|