rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
ui_icons.h File Reference

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.

Detailed Description

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

Function Documentation

◆ ui_icon_balance()

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.

Parameters
cthe canvas
xthe icon's centre, x
ythe icon's centre, y
sizethe box's side, px
colorthe colour

◆ ui_icon_battery()

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.

Parameters
cthe canvas
xthe icon's centre, x
ythe icon's centre, y
sizethe box's side, px
colorthe colour

◆ ui_icon_board()

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.

Parameters
cthe canvas
xthe icon's centre, x
ythe icon's centre, y
sizethe box's side, px
colorthe colour

◆ ui_icon_chart()

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.

Parameters
cthe canvas
xthe icon's centre, x
ythe icon's centre, y
sizethe box's side, px
colorthe colour

◆ ui_icon_chip()

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.

Parameters
cthe canvas
xthe icon's centre, x
ythe icon's centre, y
sizethe box's side, px
colorthe colour

◆ ui_icon_file()

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.

Parameters
cthe canvas
xthe icon's centre, x
ythe icon's centre, y
sizethe box's side, px
colorthe colour

◆ ui_icon_folder()

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.

Parameters
cthe canvas
xthe icon's centre, x
ythe icon's centre, y
sizethe box's side, px
colorthe colour

◆ ui_icon_list()

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.

Parameters
cthe canvas
xthe icon's centre, x
ythe icon's centre, y
sizethe box's side, px
colorthe colour

◆ ui_icon_motor()

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.

Parameters
cthe canvas
xthe icon's centre, x
ythe icon's centre, y
sizethe box's side, px
colorthe colour

◆ ui_icon_record()

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.

Parameters
cthe canvas
xthe icon's centre, x
ythe icon's centre, y
sizethe box's side, px
colorthe colour

◆ ui_icon_servo()

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.

Parameters
cthe canvas
xthe icon's centre, x
ythe icon's centre, y
sizethe box's side, px
colorthe colour

◆ ui_icon_sliders()

void ui_icon_sliders ( gfx_canvas_t * c,
int x,
int y,
int size,
gfx_color_t color )

The settings glyph: three sliders.

Parameters
cthe canvas
xthe icon's centre, x
ythe icon's centre, y
sizethe box's side, px
colorthe colour

◆ ui_icon_supply()

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.

Parameters
cthe canvas
xthe icon's centre, x
ythe icon's centre, y
sizethe box's side, px
colorthe colour

◆ ui_icon_wifi()

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.

Parameters
cthe canvas
xthe icon's centre, x
ythe icon's centre, y
sizethe box's side, px
colorthe colour