41void fillRound(
int x,
int y,
int w,
int h, uint8_t r, uint8_t c);
47void roundRect(
int x,
int y,
int w,
int h, uint8_t r, uint8_t c);
55void panel(
int x,
int y,
int w,
int h, uint8_t r, uint8_t fill, uint8_t edge);
65void panelLit(
int x,
int y,
int w,
int h, uint8_t r, uint8_t fill, uint8_t edge);
71void bevel(
int x,
int y,
int w,
int h, uint8_t c);
77void bevel(
int x,
int y,
int w,
int h, uint8_t light, uint8_t dark);
93void dither(
int x,
int y,
int w,
int h, uint8_t c, uint8_t phase);
108void remapRect(
int x,
int y,
int w,
int h,
const uint8_t *remap);
136void sprite4(
const uint8_t *data,
int x,
int y,
const uint8_t *remap =
nullptr,
int scale = 256,
139extern const uint8_t
RM_ID[16];
150void spriteRot(
const uint8_t *data,
int ax,
int ay,
int px,
int py, uint8_t angle,
int scale,
151 const uint8_t *remap);
160void rotRaw(
int w,
int h,
int ax,
int ay,
int px,
int py, uint8_t angle,
int scale,
161 const uint8_t *remap);
171void glyph(
int x,
int y,
const uint8_t *cols, uint8_t ncols, uint8_t c);
177void glyph16(
int x,
int y,
const uint16_t *rows, uint8_t nrows, uint8_t c);
187int text35(
int x,
int y,
const char *str, uint8_t c);
198int text35s(
int x,
int y,
const char *str, uint8_t c, uint8_t shade = 0);
205void text35x2(
int x,
int y,
const char *str, uint8_t c);
211void text35x2s(
int x,
int y,
const char *str, uint8_t c, uint8_t shade = 0);
CHGfx: a maximum-throughput ST7735 driver for the CHGame board (CH32X035G8U6 @ 48 MHz,...
void fillRound(int x, int y, int w, int h, uint8_t r, uint8_t c)
Fill a rectangle with rounded corners.
void spriteRot(const uint8_t *data, int ax, int ay, int px, int py, uint8_t angle, int scale, const uint8_t *remap)
Draw span4 art turned and scaled about a pivot.
void sprite4(const uint8_t *data, int x, int y, const uint8_t *remap=nullptr, int scale=256, uint8_t flip=0)
Draw span4 art, through a remap and at a scale.
void spotlight(int cx, int cy, int r, uint8_t c)
A round spotlight: a disc of dots, on 25% of its pixels (every other pixel of every other row).
void glyph16(int x, int y, const uint16_t *rows, uint8_t nrows, uint8_t c)
Draw a row-major 1 bpp glyph up to 16 wide (the leftmost pixel in bit 15).
void rotRaw(int w, int h, int ax, int ay, int px, int py, uint8_t angle, int scale, const uint8_t *remap)
spriteRot() for raw 4 bpp art the caller has put in the chunk scratch.
int text35Width(const char *str)
The width of text in the 3x5 font, without the trailing gap: for centring.
int text35(int x, int y, const char *str, uint8_t c)
Draw text in PPOT's 3x5 font.
void dropShadow(int x, int y, int w, int h)
A soft shadow (a 50% INK checker) 2 px below and right of a box.
void glyph(int x, int y, const uint8_t *cols, uint8_t ncols, uint8_t c)
Draw a column-major 1 bpp glyph (bit 0 = top row, up to 8 rows).
int text35x2Width(const char *str)
The width of text drawn with text35x2().
Definition Draw.h:215
void roundRect(int x, int y, int w, int h, uint8_t r, uint8_t c)
Outline a rectangle with rounded corners, 1 px wide.
const uint8_t RM_ID[16]
The identity remap (every colour to itself).
int text35s(int x, int y, const char *str, uint8_t c, uint8_t shade=0)
text35() over its own shade a pixel down and right (embossed).
void text35x2(int x, int y, const char *str, uint8_t c)
The 3x5 font doubled (8 px advance, 12 rows with the descender): menus.
void fillConvex(const int16_t *xy, uint8_t n, uint8_t c, int dither=-1)
Fill a convex polygon.
void panelLit(int x, int y, int w, int h, uint8_t r, uint8_t fill, uint8_t edge)
A panel lit from above.
void bevel(int x, int y, int w, int h, uint8_t c)
A raised rectangle's rim: light along the top and left, dark along the bottom and right.
void panel(int x, int y, int w, int h, uint8_t r, uint8_t fill, uint8_t edge)
A rounded panel: fillRound() in fill, then roundRect() in edge.
void text35x2s(int x, int y, const char *str, uint8_t c, uint8_t shade=0)
text35x2() over its own shade a pixel down and right.
const uint8_t LIGHTER[16]
One step lighter for each house colour (Palette).
Definition Draw.h:85
const uint8_t DARKER[16]
One step darker for each house colour (Palette): the shading that gives panels, cards and chips their...
void dither(int x, int y, int w, int h, uint8_t c, uint8_t phase)
A 50% checkerboard of one colour over a rectangle; the pixels in between are left alone (darkened bac...
void remapRect(int x, int y, int w, int h, const uint8_t *remap)
Recolour a rectangle in place: pixel = remap[pixel] (dimming, highlighting).
const uint8_t * glyph35(char ch)
A character of the 3x5 font, for drawing it yourself with glyph().
@ SPR_FLIP_V
Upside down.
Definition Draw.h:124
@ SPR_FLIP_H
Mirrored left to right (1:1 scale only).
Definition Draw.h:125