|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
Icons drawn with primitives rather than stored as bitmaps. More...
#include "gfx.h"Go to the source code of this file.
Typedefs | |
| typedef void(*) | ui_icon_fn(gfx_canvas_t *c, int x, int y, int size, gfx_color_t color) |
An icon centred on (x, y), inside a box of size x size px around it. Every ui_icon_ function below has this shape: c the canvas, x and y the centre, size the box's side in px, color the colour. | |
Functions | |
| void | ui_icon_motor (gfx_canvas_t *c, int x, int y, int size, gfx_color_t color) |
| The motor glyph: a stator ring and its hub. | |
| void | ui_icon_servo (gfx_canvas_t *c, int x, int y, int size, gfx_color_t color) |
| The servo glyph: a case and its horn. | |
| void | ui_icon_chart (gfx_canvas_t *c, int x, int y, int size, gfx_color_t color) |
| The chart glyph: a trace over its axes. | |
| void | ui_icon_record (gfx_canvas_t *c, int x, int y, int size, gfx_color_t color) |
| The record glyph: a recorder with its tray. | |
| void | ui_icon_chip (gfx_canvas_t *c, int x, int y, int size, gfx_color_t color) |
| The chip glyph: a package and its pins. | |
| void | ui_icon_sliders (gfx_canvas_t *c, int x, int y, int size, gfx_color_t color) |
| The settings glyph: three sliders. | |
| void | ui_icon_battery (gfx_canvas_t *c, int x, int y, int size, gfx_color_t color) |
| The battery glyph: a cell with its terminal and three bars. | |
| void | ui_icon_balance (gfx_canvas_t *c, int x, int y, int size, gfx_color_t color) |
| The balance glyph: a disc with an off-centre mass and two correction ticks. | |
| void | ui_icon_supply (gfx_canvas_t *c, int x, int y, int size, gfx_color_t color) |
| The supply glyph: a bench supply's front. | |
| void | ui_icon_list (gfx_canvas_t *c, int x, int y, int size, gfx_color_t color) |
| The pin list glyph: three rows, each a pin and its line. | |
| void | ui_icon_board (gfx_canvas_t *c, int x, int y, int size, gfx_color_t color) |
| The board glyph: a board from above with its pads. | |
| void | ui_icon_wifi (gfx_canvas_t *c, int x, int y, int size, gfx_color_t color) |
| The Wi-Fi glyph: arcs over a dot. | |
| void | ui_icon_folder (gfx_canvas_t *c, int x, int y, int size, gfx_color_t color) |
| A folder: its tab and its body. | |
| void | ui_icon_file (gfx_canvas_t *c, int x, int y, int size, gfx_color_t color) |
| A page of a file, its corner folded. | |
Icons drawn with primitives rather than stored as bitmaps.
Fourteen glyphs at any size, a few hundred bytes of code each, built from filled spans and discs, which are cheap to draw into PSRAM (pseudo-static random-access memory).
SPDX-License-Identifier: MIT
| void ui_icon_balance | ( | gfx_canvas_t * | c, |
| int | x, | ||
| int | y, | ||
| int | size, | ||
| gfx_color_t | color ) |
The balance glyph: a disc with an off-centre mass and two correction ticks.
| c | the canvas |
| x | the icon's centre, x |
| y | the icon's centre, y |
| size | the box's side, px |
| color | the colour |
| void ui_icon_battery | ( | gfx_canvas_t * | c, |
| int | x, | ||
| int | y, | ||
| int | size, | ||
| gfx_color_t | color ) |
The battery glyph: a cell with its terminal and three bars.
| c | the canvas |
| x | the icon's centre, x |
| y | the icon's centre, y |
| size | the box's side, px |
| color | the colour |
| void ui_icon_board | ( | gfx_canvas_t * | c, |
| int | x, | ||
| int | y, | ||
| int | size, | ||
| gfx_color_t | color ) |
The board glyph: a board from above with its pads.
| c | the canvas |
| x | the icon's centre, x |
| y | the icon's centre, y |
| size | the box's side, px |
| color | the colour |
| void ui_icon_chart | ( | gfx_canvas_t * | c, |
| int | x, | ||
| int | y, | ||
| int | size, | ||
| gfx_color_t | color ) |
The chart glyph: a trace over its axes.
| c | the canvas |
| x | the icon's centre, x |
| y | the icon's centre, y |
| size | the box's side, px |
| color | the colour |
| void ui_icon_chip | ( | gfx_canvas_t * | c, |
| int | x, | ||
| int | y, | ||
| int | size, | ||
| gfx_color_t | color ) |
The chip glyph: a package and its pins.
| c | the canvas |
| x | the icon's centre, x |
| y | the icon's centre, y |
| size | the box's side, px |
| color | the colour |
| void ui_icon_file | ( | gfx_canvas_t * | c, |
| int | x, | ||
| int | y, | ||
| int | size, | ||
| gfx_color_t | color ) |
A page of a file, its corner folded.
| c | the canvas |
| x | the icon's centre, x |
| y | the icon's centre, y |
| size | the box's side, px |
| color | the colour |
| void ui_icon_folder | ( | gfx_canvas_t * | c, |
| int | x, | ||
| int | y, | ||
| int | size, | ||
| gfx_color_t | color ) |
A folder: its tab and its body.
| c | the canvas |
| x | the icon's centre, x |
| y | the icon's centre, y |
| size | the box's side, px |
| color | the colour |
| void ui_icon_list | ( | gfx_canvas_t * | c, |
| int | x, | ||
| int | y, | ||
| int | size, | ||
| gfx_color_t | color ) |
The pin list glyph: three rows, each a pin and its line.
| c | the canvas |
| x | the icon's centre, x |
| y | the icon's centre, y |
| size | the box's side, px |
| color | the colour |
| void ui_icon_motor | ( | gfx_canvas_t * | c, |
| int | x, | ||
| int | y, | ||
| int | size, | ||
| gfx_color_t | color ) |
The motor glyph: a stator ring and its hub.
| c | the canvas |
| x | the icon's centre, x |
| y | the icon's centre, y |
| size | the box's side, px |
| color | the colour |
| void ui_icon_record | ( | gfx_canvas_t * | c, |
| int | x, | ||
| int | y, | ||
| int | size, | ||
| gfx_color_t | color ) |
The record glyph: a recorder with its tray.
| c | the canvas |
| x | the icon's centre, x |
| y | the icon's centre, y |
| size | the box's side, px |
| color | the colour |
| void ui_icon_servo | ( | gfx_canvas_t * | c, |
| int | x, | ||
| int | y, | ||
| int | size, | ||
| gfx_color_t | color ) |
The servo glyph: a case and its horn.
| c | the canvas |
| x | the icon's centre, x |
| y | the icon's centre, y |
| size | the box's side, px |
| color | the colour |
| void ui_icon_sliders | ( | gfx_canvas_t * | c, |
| int | x, | ||
| int | y, | ||
| int | size, | ||
| gfx_color_t | color ) |
The settings glyph: three sliders.
| c | the canvas |
| x | the icon's centre, x |
| y | the icon's centre, y |
| size | the box's side, px |
| color | the colour |
| void ui_icon_supply | ( | gfx_canvas_t * | c, |
| int | x, | ||
| int | y, | ||
| int | size, | ||
| gfx_color_t | color ) |
The supply glyph: a bench supply's front.
| c | the canvas |
| x | the icon's centre, x |
| y | the icon's centre, y |
| size | the box's side, px |
| color | the colour |
| void ui_icon_wifi | ( | gfx_canvas_t * | c, |
| int | x, | ||
| int | y, | ||
| int | size, | ||
| gfx_color_t | color ) |
The Wi-Fi glyph: arcs over a dot.
| c | the canvas |
| x | the icon's centre, x |
| y | the icon's centre, y |
| size | the box's side, px |
| color | the colour |