Provides palette swap functionality for Swadge.
- Author
- Jeremy Stintzcum (jerem.nosp@m.y.st.nosp@m.intzc.nosp@m.um@g.nosp@m.mail..nosp@m.com)
- Version
- 1.0.0
- Date
- 2024-09-20
- Copyright
- Copyright (c) 2024
|
void | drawWsgPalette (const wsg_t *wsg, int16_t xOff, int16_t yOff, wsgPalette_t *palette, bool flipLR, bool flipUD, int16_t rotateDeg) |
| Draw a WSG to the display utilizing a palette.
|
|
void | drawWsgPaletteSimple (const wsg_t *wsg, int16_t xOff, int16_t yOff, wsgPalette_t *palette) |
| Draw a WSG to the display without flipping or rotation.
|
|
void | drawWsgPaletteSimpleScaled (const wsg_t *wsg, int16_t xOff, int16_t yOff, wsgPalette_t *palette, int16_t xScale, int16_t yScale) |
| Draw a WSG to the display without flipping or rotation.
|
|
void | drawWsgPaletteSimpleHalf (const wsg_t *wsg, int16_t xOff, int16_t yOff, wsgPalette_t *palette) |
| Draw a WSG to the display without flipping or rotation at half size.
|
|
void | wsgPaletteReset (wsgPalette_t *palette) |
| Resets the palette to initial state.
|
|
void | wsgPaletteSet (wsgPalette_t *palette, paletteColor_t replacedColor, paletteColor_t newColor) |
| Sets a single color to the provided palette.
|
|
void | wsgPaletteSetGroup (wsgPalette_t *palette, paletteColor_t *replacedColors, paletteColor_t *newColors, uint8_t arrSize) |
|
◆ drawWsgPalette()
void drawWsgPalette |
( |
const wsg_t * | wsg, |
|
|
int16_t | xOff, |
|
|
int16_t | yOff, |
|
|
wsgPalette_t * | palette, |
|
|
bool | flipLR, |
|
|
bool | flipUD, |
|
|
int16_t | rotateDeg ) |
Draw a WSG to the display utilizing a palette.
- Parameters
-
wsg | The WSG to draw to the display |
xOff | The x offset to draw the WSG at |
yOff | The y offset to draw the WSG at |
palette | The new palette used to translate the colors |
flipLR | true to flip the image across the Y axis |
flipUD | true to flip the image across the X axis |
rotateDeg | The number of degrees to rotate clockwise, must be 0-359 |
◆ drawWsgPaletteSimple()
void drawWsgPaletteSimple |
( |
const wsg_t * | wsg, |
|
|
int16_t | xOff, |
|
|
int16_t | yOff, |
|
|
wsgPalette_t * | palette ) |
Draw a WSG to the display without flipping or rotation.
- Parameters
-
wsg | The WSG to draw to the display |
xOff | The x offset to draw the WSG at |
yOff | The y offset to draw the WSG at |
palette | Color Map to use |
◆ drawWsgPaletteSimpleScaled()
void drawWsgPaletteSimpleScaled |
( |
const wsg_t * | wsg, |
|
|
int16_t | xOff, |
|
|
int16_t | yOff, |
|
|
wsgPalette_t * | palette, |
|
|
int16_t | xScale, |
|
|
int16_t | yScale ) |
Draw a WSG to the display without flipping or rotation.
- Parameters
-
wsg | The WSG to draw to the display |
xOff | The x offset to draw the WSG at |
yOff | The y offset to draw the WSG at |
palette | Color Map to use |
xScale | The amount to scale the image horizontally |
yScale | The amount to scale the image vertically |
◆ drawWsgPaletteSimpleHalf()
void drawWsgPaletteSimpleHalf |
( |
const wsg_t * | wsg, |
|
|
int16_t | xOff, |
|
|
int16_t | yOff, |
|
|
wsgPalette_t * | palette ) |
Draw a WSG to the display without flipping or rotation at half size.
- Parameters
-
wsg | The WSG to draw to the display |
xOff | The x offset to draw the WSG at |
yOff | The y offset to draw the WSG at |
palette | Color Map to use |
◆ wsgPaletteReset()
Resets the palette to initial state.
- Parameters
-
palette | Color map to modify |
◆ wsgPaletteSet()
Sets a single color to the provided palette.
- Parameters
-
palette | Color map to modify |
replacedColor | Color to be replaced |
newColor | Color that will replace the previous |
◆ wsgPaletteSetGroup()