|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Overlay draw primitives + embedded 5x7 font. More...
Go to the source code of this file.
Functions | |
| uint16_t | board_overlay_sidebar_width (void) |
| Width in pixels the status sidebar adds to the right of the panel. | |
| uint16_t | board_overlay_total_width (uint16_t panel_w) |
Total composite width for a panel of width panel_w. | |
| uint16_t | board_overlay_total_height (uint16_t panel_h) |
Total composite height for a panel of height panel_h. | |
| void | priv_px (board_overlay_surface_t *surface, int32_t x, int32_t y, uint16_t color) |
| Plot one pixel if it lies inside the supplied surface. | |
| void | priv_fill_rect (board_overlay_surface_t *surface, int32_t x, int32_t y, int32_t rw, int32_t rh, uint16_t color) |
Fill the axis-aligned rectangle [x,x+rw) x [y,y+rh) with color. | |
| static RA8_INTERNAL void | internal_draw_glyph (board_overlay_surface_t *surface, int32_t x, int32_t y, char ch, uint16_t color, int32_t sc) |
Draw one ASCII glyph at scale sc; non-printable maps to space. | |
| int32_t | priv_draw_text (board_overlay_surface_t *surface, int32_t x, int32_t y, const char *s, uint16_t color, int32_t sc) |
| Draw a NUL-terminated string; returns the x just past the last cell. | |
| int32_t | priv_section_head (board_overlay_surface_t *surface, int32_t x, int32_t y, const char *title) |
| Draw a section heading (accent colour) with a thin rule beneath it. | |
| int32_t | priv_kv_row (board_overlay_surface_t *surface, int32_t x, int32_t y, const char *label, const char *value, uint16_t val_color) |
| Draw a "label value" row: dim label, bright value, returns next y. | |
| void | priv_blit_panel (uint16_t *out, uint16_t w, uint16_t h, const uint16_t *panel, uint16_t panel_w, uint16_t panel_h) |
| Blit the panel framebuffer into the composite's top-left region. | |
Variables | |
| static const uint8_t | s_k_font5x7 [(k_ovl_glyph_last - k_ovl_glyph_first)+1U][k_ovl_glyph_w] |
Overlay draw primitives + embedded 5x7 font.
The pixel/rect/text/blit primitives and the public-domain 5x7 column-major ASCII font every overlay panel draws with – moved verbatim out of board_overlay.c.
Definition in file board_overlay_draw.c.
| uint16_t board_overlay_sidebar_width | ( | void | ) |
Width in pixels the status sidebar adds to the right of the panel.
Width in pixels the status sidebar adds to the right of the panel; this step is contained within the board overlay model and uses bounded caller or module-owned storage.
| value | The operation-specific board overlay sidebar width value. |
Definition at line 119 of file board_overlay_draw.c.
References k_ovl_sidebar_w.
| uint16_t board_overlay_total_height | ( | uint16_t | panel_h | ) |
Total composite height for a panel of height panel_h.
At least a minimum so the sidebar's text always fits even when the panel is short (a non-display example may have a tiny / blank panel region).
| [in] | panel_h | Panel framebuffer height in pixels. |
panel_h and the sidebar's minimum height. | value | The operation-specific board overlay total height value. |
Definition at line 129 of file board_overlay_draw.c.
References k_ovl_min_h.
Referenced by board_overlay_compose(), and board_overlay_draw_sidebar().
| uint16_t board_overlay_total_width | ( | uint16_t | panel_w | ) |
Total composite width for a panel of width panel_w.
| [in] | panel_w | Panel framebuffer width in pixels. |
panel_w plus the sidebar width. Total composite width for a panel of width panel_w; this step is contained within the board overlay model and uses bounded caller or module-owned storage.
| value | The operation-specific board overlay total width value. |
Definition at line 124 of file board_overlay_draw.c.
References k_ovl_sidebar_w.
Referenced by board_overlay_compose(), and board_overlay_draw_sidebar().
|
static |
Draw one ASCII glyph at scale sc; non-printable maps to space.
Draw one ascii glyph at scale sc; non-printable maps to space; this step is contained within the board overlay draw model and uses bounded caller or module-owned storage.
| [in,out] | surface | Descriptor-backed presentation surface to access. |
| [in] | x | Horizontal coordinate in pixels. |
| [in] | y | Vertical coordinate in pixels. |
| [in] | ch | Selected channel identifier. |
| [in] | color | RGB color value used by the drawing operation. |
| [in] | sc | Sc input used by the operation. |
Definition at line 185 of file board_overlay_draw.c.
References k_ovl_glyph_first, k_ovl_glyph_h, k_ovl_glyph_last, k_ovl_glyph_w, priv_fill_rect(), RA8_INTERNAL, and s_k_font5x7.
Referenced by priv_draw_text().
| void priv_blit_panel | ( | uint16_t * | out, |
| uint16_t | w, | ||
| uint16_t | h, | ||
| const uint16_t * | panel, | ||
| uint16_t | panel_w, | ||
| uint16_t | panel_h ) |
Blit the panel framebuffer into the composite's top-left region.
Blit the rendered panel into the composite's panel region.
Definition at line 252 of file board_overlay_draw.c.
References k_ovl_panel_bg.
Referenced by board_overlay_compose().
| int32_t priv_draw_text | ( | board_overlay_surface_t * | surface, |
| int32_t | x, | ||
| int32_t | y, | ||
| const char * | s, | ||
| uint16_t | color, | ||
| int32_t | sc ) |
Draw a NUL-terminated string; returns the x just past the last cell.
Draw a NUL-terminated string; returns the x after the last glyph.
Definition at line 207 of file board_overlay_draw.c.
References internal_draw_glyph(), and k_ovl_glyph_w.
Referenced by board_overlay_draw_sidebar(), internal_draw_button(), internal_draw_console_body(), internal_draw_console_heading(), internal_draw_console_tabs(), internal_draw_core(), internal_draw_led(), internal_draw_power(), priv_kv_row(), and priv_section_head().
| void priv_fill_rect | ( | board_overlay_surface_t * | surface, |
| int32_t | x, | ||
| int32_t | y, | ||
| int32_t | rw, | ||
| int32_t | rh, | ||
| uint16_t | color ) |
Fill the axis-aligned rectangle [x,x+rw) x [y,y+rh) with color.
Fill a clipped rectangle in the composite (draw primitive).
Definition at line 141 of file board_overlay_draw.c.
References board_overlay_surface_t::context, board_overlay_surface_t::fill, board_overlay_surface_t::height, board_overlay_surface_t::ok, and board_overlay_surface_t::width.
Referenced by board_overlay_draw_sidebar(), internal_draw_button(), internal_draw_console(), internal_draw_console_heading(), internal_draw_console_tabs(), internal_draw_core(), internal_draw_glyph(), internal_draw_led(), internal_draw_power(), priv_px(), and priv_section_head().
| int32_t priv_kv_row | ( | board_overlay_surface_t * | surface, |
| int32_t | x, | ||
| int32_t | y, | ||
| const char * | label, | ||
| const char * | value, | ||
| uint16_t | val_color ) |
Draw a "label value" row: dim label, bright value, returns next y.
Draw a "label value" row: dim label, coloured value; returns next y.
Definition at line 237 of file board_overlay_draw.c.
References k_kv_label_cols, k_ovl_dim, k_ovl_glyph_w, k_row_step, and priv_draw_text().
Referenced by internal_draw_io_block(), and internal_draw_run_stats().
| void priv_px | ( | board_overlay_surface_t * | surface, |
| int32_t | x, | ||
| int32_t | y, | ||
| uint16_t | color ) |
Plot one pixel if it lies inside the supplied surface.
Plot one clipped pixel into the composite (draw primitive).
Definition at line 135 of file board_overlay_draw.c.
References priv_fill_rect().
| int32_t priv_section_head | ( | board_overlay_surface_t * | surface, |
| int32_t | x, | ||
| int32_t | y, | ||
| const char * | title ) |
Draw a section heading (accent colour) with a thin rule beneath it.
Draw a section heading (accent colour) with a thin rule beneath it; this step is contained within the board overlay model and uses bounded caller or module-owned storage.
| [in,out] | surface | Descriptor-backed presentation surface to access. |
| [in] | x | Horizontal coordinate in pixels. |
| [in] | y | Vertical coordinate in pixels. |
| [in] | title | Title input used by the operation. |
| value | The operation-specific section head value. |
Definition at line 224 of file board_overlay_draw.c.
References k_heading_gap, k_ovl_accent, k_ovl_rule, k_ovl_sidebar_w, k_pad_x, k_rule_dy, priv_draw_text(), and priv_fill_rect().
Referenced by internal_draw_buttons(), internal_draw_io_block(), internal_draw_leds(), internal_draw_power(), and internal_draw_run_stats().
|
static |
Definition at line 21 of file board_overlay_draw.c.
Referenced by internal_draw_glyph().