Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
Loading...
Searching...
No Matches
fill.h
Go to the documentation of this file.
1
46#ifndef _FILL_H_
47#define _FILL_H_
48
49#include <stdint.h>
50#include <stdbool.h>
51
52#include "palette.h"
53
54void fillDisplayArea(int16_t x1, int16_t y1, int16_t x2, int16_t y2, paletteColor_t c);
55void shadeDisplayArea(int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint8_t shadeLevel, paletteColor_t color);
56void oddEvenFill(int x0, int y0, int x1, int y1, paletteColor_t boundaryColor, paletteColor_t fillColor);
57void floodFill(uint16_t x, uint16_t y, paletteColor_t col, uint16_t xMin, uint16_t yMin, uint16_t xMax, uint16_t yMax);
58void fillCircleSector(uint16_t x, uint16_t y, uint16_t innerR, uint16_t outerR, uint16_t startAngle, uint16_t endAngle,
59 paletteColor_t col);
60
61#endif
void shadeDisplayArea(int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint8_t shadeLevel, paletteColor_t color)
Definition fill.c:70
void fillDisplayArea(int16_t x1, int16_t y1, int16_t x2, int16_t y2, paletteColor_t c)
Fill a rectangular area on a display with a single color.
Definition fill.c:36
void oddEvenFill(int x0, int y0, int x1, int y1, paletteColor_t boundaryColor, paletteColor_t fillColor)
Attempt to fill a convex shape bounded by a border of a given color using the even-odd rule.
Definition fill.c:221
void floodFill(uint16_t x, uint16_t y, paletteColor_t col, uint16_t xMin, uint16_t yMin, uint16_t xMax, uint16_t yMax)
Definition fill.c:317
void fillCircleSector(uint16_t x, uint16_t y, uint16_t innerR, uint16_t outerR, uint16_t startAngle, uint16_t endAngle, paletteColor_t col)
Helper function to draw a filled circle with translation and scaling.
Definition fill.c:478
paletteColor_t
All 216 possible colors, named like cRGB.
Definition palette.h:23