Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
|
The shape and curve drawing code is based on Zingl Alois's bresenham.c. More explanation can be found on their webpage. An older version of bresenham.c can be found with an older description on an older webpage.
Most, but not all, functions have Scaled
and normal versions. Scaled
functions can both scale and translate a shape or curve before drawing, while normal functions draw one line widths. Scaled
functions were originally written for MFPaint to draw to a restricted area.
Some functions, like drawTriangleOutlined() and drawLineFast() were written for the Swadge and not based on the original bresenham.c.
initShapes() is called automatically before the Swadge mode is run. It should not be called from within a Swadge Mode.
Draw shapes and curves with the given functions. Each function has it's own description below that won't be copied here.
Go to the source code of this file.
Functions | |
void | drawLineFast (int16_t x0, int16_t y0, int16_t x1, int16_t y1, paletteColor_t color) |
Optimized method to quickly draw a one pixel wide solid line. | |
void | drawLine (int x0, int y0, int x1, int y1, paletteColor_t col, int dashWidth) |
Draw a one pixel wide straight line between two points. The line may be solid or dashed. | |
void | drawLineScaled (int x0, int y0, int x1, int y1, paletteColor_t col, int dashWidth, int xOrigin, int yOrigin, int xScale, int yScale) |
Draw a line that that is translated and scaled. Scaling may make it wider than one pixel. The line may be solid or dashed. The line coordinates are given in terms scaled pixels, not display pixels. The origin of the scaled pixel coordinates can be translated using xOrigin and yOrigin, essentially creating a "canvas" of scaled pixels in a section of the screen. | |
void | drawRect (int x0, int y0, int x1, int y1, paletteColor_t col) |
Draw the a one pixel wide outline of a rectangle. | |
void | drawRectFilled (int x0, int y0, int x1, int y1, paletteColor_t col) |
Draw a filled rectangle, with bounds checking and arbitrary orders. | |
void | drawRectScaled (int x0, int y0, int x1, int y1, paletteColor_t col, int xOrigin, int yOrigin, int xScale, int yScale) |
Draw the outline of a rectangle that is translated and scaled. Scaling may make it wider than one pixel. | |
void | drawRoundedRect (int x0, int y0, int x1, int y1, int r, paletteColor_t fillColor, paletteColor_t outlineColor) |
Draw an outlined and filled rectangle with rounded corners. | |
void | drawTriangleOutlined (int16_t v0x, int16_t v0y, int16_t v1x, int16_t v1y, int16_t v2x, int16_t v2y, paletteColor_t fillColor, paletteColor_t outlineColor) |
Optimized method to draw a triangle with outline. The interior color may be cTransparent to draw just an outline. | |
void | drawEllipse (int xm, int ym, int a, int b, paletteColor_t col) |
Draw a one pixel wide outline of an ellipse. | |
void | drawEllipseScaled (int xm, int ym, int a, int b, paletteColor_t col, int xOrigin, int yOrigin, int xScale, int yScale) |
Draw the outline of an ellipse with translation and scaling. Scaling may make it wider than one pixel. | |
void | drawCircle (int xm, int ym, int r, paletteColor_t col) |
Draw the one pixel wide outline of a circle. | |
void | drawCircleScaled (int xm, int ym, int r, paletteColor_t col, int xOrigin, int yOrigin, int xScale, int yScale) |
Draw the outline of a circle with translation and scaling. Scaling may make it wider than one pixel. | |
void | drawCircleQuadrants (int xm, int ym, int r, bool q1, bool q2, bool q3, bool q4, paletteColor_t col) |
Draw the one pixel wide outline of the quadrants of a circle. | |
void | drawCircleFilled (int xm, int ym, int r, paletteColor_t col) |
Draw a filled circle. | |
void | drawCircleFilledScaled (int xm, int ym, int r, paletteColor_t col, int xOrigin, int yOrigin, int xScale, int yScale) |
Draw a filed circle with translation and scaling. | |
void | drawCircleFilledQuadrants (int xm, int ym, int r, bool q1, bool q2, bool q3, bool q4, paletteColor_t col) |
Draw filled-in quadrants of a circle. | |
void | drawCircleOutline (int xm, int ym, int r, int stroke, paletteColor_t col) |
Draw the outline of a circle with the given stroke width. | |
void | drawEllipseRect (int x0, int y0, int x1, int y1, paletteColor_t col) |
Draw a one pixel wide outline of an ellipse within a rectangle. | |
void | drawEllipseRectScaled (int x0, int y0, int x1, int y1, paletteColor_t col, int xOrigin, int yOrigin, int xScale, int yScale) |
Draw the outline of an ellipse with translation and scaling within a rectangle. Scaling may make it wider than one pixel. | |
void | drawQuadBezierSeg (int x0, int y0, int x1, int y1, int x2, int y2, paletteColor_t col) |
Draw a one pixel wide quadratic Bezier curve. This is limited to gradients without sign change. | |
void | drawQuadBezierSegScaled (int x0, int y0, int x1, int y1, int x2, int y2, paletteColor_t col, int xOrigin, int yOrigin, int xScale, int yScale) |
Draw a one pixel wide quadratic Bezier curve with translation and scaling. This is limited to gradients without sign change. | |
void | drawQuadBezier (int x0, int y0, int x1, int y1, int x2, int y2, paletteColor_t col) |
Draw a one pixel wide quadratic Bezier curve. | |
void | drawQuadBezierScaled (int x0, int y0, int x1, int y1, int x2, int y2, paletteColor_t col, int xOrigin, int yOrigin, int xScale, int yScale) |
Draw a one pixel wide quadratic Bezier curve with translation and scaling. | |
void | drawQuadRationalBezierSeg (int x0, int y0, int x1, int y1, int x2, int y2, float w, paletteColor_t col) |
Draw a limited one pixel wide rational Bezier curve with squared weight. | |
void | drawQuadRationalBezier (int x0, int y0, int x1, int y1, int x2, int y2, float w, paletteColor_t col) |
Draw any one pixel wide quadratic rational Bezier curve with squared weight. | |
void | drawRotatedEllipse (int x, int y, int a, int b, float angle, paletteColor_t col) |
Draw an ellipse rotated by angle (radian) | |
void | drawRotatedEllipseRect (int x0, int y0, int x1, int y1, long zd, paletteColor_t col) |
Draw an ellipse, bounded by a rectangle, rotated (integer) | |
void | drawCubicBezierSeg (int x0, int y0, float x1, float y1, float x2, float y2, int x3, int y3, paletteColor_t col) |
Draw limited cubic Bezier segment. | |
void | drawCubicBezier (int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3, paletteColor_t col) |
Draw any cubic Bezier curve. | |
void | drawCubicBezierScaled (int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3, paletteColor_t col, int xOrigin, int yOrigin, int xScale, int yScale) |
Draw any cubic Bezier curve with translation and scaling. | |
void | drawQuadSpline (int n, int x[], int y[], paletteColor_t col) |
Draw a quadratic spline. This overwrites the input arrays x and y. | |
void | drawCubicSpline (int n, int x[], int y[], paletteColor_t col) |
Draw a cubic spline. This overwrites the input arrays x and y. | |
void | initShapes (void) |
Initialize shape drawing by making a static local pointer to the framebuffer This is done for speed reasons. | |
void drawLineFast | ( | int16_t | x0, |
int16_t | y0, | ||
int16_t | x1, | ||
int16_t | y1, | ||
paletteColor_t | color ) |
Optimized method to quickly draw a one pixel wide solid line.
x0 | The X coordinate to start the line at |
y0 | The Y coordinate to start the line at |
x1 | The X coordinate to end the line at |
y1 | The Y coordinate to end the line at |
color | The color to draw the line |
void drawLine | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
paletteColor_t | col, | ||
int | dashWidth ) |
Draw a one pixel wide straight line between two points. The line may be solid or dashed.
x0 | The X coordinate to start the line at |
y0 | The Y coordinate to start the line at |
x1 | The X coordinate to end the line at |
y1 | The Y coordinate to end the line at |
col | The color to draw |
dashWidth | The width of each dash, or 0 for a solid line |
void drawLineScaled | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
paletteColor_t | col, | ||
int | dashWidth, | ||
int | xOrigin, | ||
int | yOrigin, | ||
int | xScale, | ||
int | yScale ) |
Draw a line that that is translated and scaled. Scaling may make it wider than one pixel. The line may be solid or dashed. The line coordinates are given in terms scaled pixels, not display pixels. The origin of the scaled pixel coordinates can be translated using xOrigin and yOrigin, essentially creating a "canvas" of scaled pixels in a section of the screen.
x0 | The X coordinate to start the line at, in scaled pixels |
y0 | The Y coordinate to start the line at, in scaled pixels |
x1 | The X coordinate to end the line at, in scaled pixels |
y1 | The Y coordinate to end the line at, in scaled pixels |
col | The color to draw |
dashWidth | The width of each dash, in scaled pixels, or 0 for a solid line |
xOrigin | The X-origin, in display pixels, of the scaled pixel area |
yOrigin | The Y-origin, in display pixels, of the scaled pixel area |
xScale | The width of each scaled pixel |
yScale | The height of each scaled pixel |
void drawRect | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
paletteColor_t | col ) |
Draw the a one pixel wide outline of a rectangle.
x0 | The X coordinate of the top left corner |
y0 | The Y coordinate of the top left corner |
x1 | The X coordinate of the bottom right corner |
y1 | The Y coordinate of the bottom right corner |
col | The color to draw |
void drawRectFilled | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
paletteColor_t | col ) |
Draw a filled rectangle, with bounds checking and arbitrary orders.
x0 | |
y0 | |
x1 | |
y1 | |
col |
void drawRectScaled | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
paletteColor_t | col, | ||
int | xOrigin, | ||
int | yOrigin, | ||
int | xScale, | ||
int | yScale ) |
Draw the outline of a rectangle that is translated and scaled. Scaling may make it wider than one pixel.
x0 | The X coordinate of the top left corner |
y0 | The Y coordinate of the top left corner |
x1 | The X coordinate of the bottom right corner |
y1 | The Y coordinate of the bottom right corner |
col | The color to draw |
xOrigin | The X-origin, in display pixels, of the scaled pixel area |
yOrigin | The Y-origin, in display pixels, of the scaled pixel area |
xScale | The width of each scaled pixel |
yScale | The height of each scaled pixel |
void drawRoundedRect | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
int | r, | ||
paletteColor_t | fillColor, | ||
paletteColor_t | outlineColor ) |
Draw an outlined and filled rectangle with rounded corners.
x0 | The left edge of the rectangle |
y0 | The top edge of the rectangle |
x1 | The right edge of the rectangle |
y1 | The bottom edge of the rectangle |
r | The radius of the rectangle corners |
fillColor | The color to fill the body, or cTransparent to skip |
outlineColor | The color to outline the rectangle, or cTransparent to skip |
void drawTriangleOutlined | ( | int16_t | v0x, |
int16_t | v0y, | ||
int16_t | v1x, | ||
int16_t | v1y, | ||
int16_t | v2x, | ||
int16_t | v2y, | ||
paletteColor_t | fillColor, | ||
paletteColor_t | outlineColor ) |
Optimized method to draw a triangle with outline. The interior color may be cTransparent to draw just an outline.
v0x | Vertex 0's X coordinate |
v0y | Vertex 0's Y coordinate |
v1x | Vertex 1's X coordinate |
v1y | Vertex 1's Y coordinate |
v2x | Vertex 2's X coordinate |
v2y | Vertex 2's Y coordinate |
fillColor | filled area color |
outlineColor | outline color |
void drawEllipse | ( | int | xm, |
int | ym, | ||
int | a, | ||
int | b, | ||
paletteColor_t | col ) |
Draw a one pixel wide outline of an ellipse.
xm | The X coordinate of the center of the ellipse |
ym | The Y coordinate of the center of the ellipse |
a | The X radius of the ellipse |
b | The Y radius of the ellipse |
col | The color to draw |
void drawEllipseScaled | ( | int | xm, |
int | ym, | ||
int | a, | ||
int | b, | ||
paletteColor_t | col, | ||
int | xOrigin, | ||
int | yOrigin, | ||
int | xScale, | ||
int | yScale ) |
Draw the outline of an ellipse with translation and scaling. Scaling may make it wider than one pixel.
xm | The X coordinate of the center of the ellipse |
ym | The Y coordinate of the center of the ellipse |
a | The X radius of the ellipse |
b | The Y radius of the ellipse |
col | The color to draw |
xOrigin | The X-origin, in display pixels, of the scaled pixel area |
yOrigin | The Y-origin, in display pixels, of the scaled pixel area |
xScale | The width of each scaled pixel |
yScale | The height of each scaled pixel |
void drawCircle | ( | int | xm, |
int | ym, | ||
int | r, | ||
paletteColor_t | col ) |
Draw the one pixel wide outline of a circle.
xm | The X coordinate of the center of the circle |
ym | The Y coordinate of the center of the circle |
r | The radius of the circle |
col | The color to draw |
void drawCircleScaled | ( | int | xm, |
int | ym, | ||
int | r, | ||
paletteColor_t | col, | ||
int | xOrigin, | ||
int | yOrigin, | ||
int | xScale, | ||
int | yScale ) |
Draw the outline of a circle with translation and scaling. Scaling may make it wider than one pixel.
xm | The X coordinate of the center of the circle |
ym | The Y coordinate of the center of the circle |
r | The radius of the circle |
col | The color to draw |
xOrigin | The X-origin, in display pixels, of the scaled pixel area |
yOrigin | The Y-origin, in display pixels, of the scaled pixel area |
xScale | The width of each scaled pixel |
yScale | The height of each scaled pixel |
void drawCircleQuadrants | ( | int | xm, |
int | ym, | ||
int | r, | ||
bool | q1, | ||
bool | q2, | ||
bool | q3, | ||
bool | q4, | ||
paletteColor_t | col ) |
Draw the one pixel wide outline of the quadrants of a circle.
xm | The X coordinate of the center of the circle |
ym | The Y coordinate of the center of the circle |
r | The radius of the circle |
q1 | True to draw the top right quadrant |
q2 | True to draw the top left quadrant |
q3 | True to draw the bottom left quadrant |
q4 | True to draw the bottom right quadrant |
col | The color to draw |
void drawCircleFilled | ( | int | xm, |
int | ym, | ||
int | r, | ||
paletteColor_t | col ) |
Draw a filled circle.
xm | The X coordinate of the center of the circle |
ym | The Y coordinate of the center of the circle |
r | The radius of the circle |
col | The color to draw |
void drawCircleFilledScaled | ( | int | xm, |
int | ym, | ||
int | r, | ||
paletteColor_t | col, | ||
int | xOrigin, | ||
int | yOrigin, | ||
int | xScale, | ||
int | yScale ) |
Draw a filed circle with translation and scaling.
xm | The X coordinate of the center of the circle |
ym | The Y coordinate of the center of the circle |
r | The radius of the circle |
col | The color to draw |
xOrigin | The X-origin, in display pixels, of the scaled pixel area |
yOrigin | The Y-origin, in display pixels, of the scaled pixel area |
xScale | The width of each scaled pixel |
yScale | The height of each scaled pixel |
void drawCircleFilledQuadrants | ( | int | xm, |
int | ym, | ||
int | r, | ||
bool | q1, | ||
bool | q2, | ||
bool | q3, | ||
bool | q4, | ||
paletteColor_t | col ) |
Draw filled-in quadrants of a circle.
xm | The X coordinate of the center of the circle |
ym | The Y coordinate of the center of the circle |
r | The radius of the circle |
q1 | True to draw the top right quadrant |
q2 | True to draw the top left quadrant |
q3 | True to draw the bottom left quadrant |
q4 | True to draw the bottom right quadrant |
col | The color to fill the shape in |
Left half
void drawCircleOutline | ( | int | xm, |
int | ym, | ||
int | r, | ||
int | stroke, | ||
paletteColor_t | col ) |
Draw the outline of a circle with the given stroke width.
xm | The X coordinate of the center of the circle |
ym | The Y coordinate of the center of the circle |
r | The radius of the circle |
stroke | The stroke width (pixels inside the radius) |
col | The color to draw |
void drawEllipseRect | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
paletteColor_t | col ) |
Draw a one pixel wide outline of an ellipse within a rectangle.
x0 | The X coordinate of the top left corner |
y0 | The Y coordinate of the top left corner |
x1 | The X coordinate of the bottom right corner |
y1 | The Y coordinate of the bottom right corner |
col | The color to draw |
void drawEllipseRectScaled | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
paletteColor_t | col, | ||
int | xOrigin, | ||
int | yOrigin, | ||
int | xScale, | ||
int | yScale ) |
Draw the outline of an ellipse with translation and scaling within a rectangle. Scaling may make it wider than one pixel.
x0 | The X coordinate of the top left corner |
y0 | The Y coordinate of the top left corner |
x1 | The X coordinate of the bottom right corner |
y1 | The Y coordinate of the bottom right corner |
col | The color to draw |
xOrigin | The X-origin, in display pixels, of the scaled pixel area |
yOrigin | The Y-origin, in display pixels, of the scaled pixel area |
xScale | The width of each scaled pixel |
yScale | The height of each scaled pixel |
void drawQuadBezierSeg | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2, | ||
paletteColor_t | col ) |
Draw a one pixel wide quadratic Bezier curve. This is limited to gradients without sign change.
x0 | The X coordinate of the first point |
y0 | The Y coordinate of the first point |
x1 | The X coordinate of the second point |
y1 | The Y coordinate of the second point |
x2 | The X coordinate of the third point |
y2 | The Y coordinate of the third point |
col | The color to draw |
void drawQuadBezierSegScaled | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2, | ||
paletteColor_t | col, | ||
int | xOrigin, | ||
int | yOrigin, | ||
int | xScale, | ||
int | yScale ) |
Draw a one pixel wide quadratic Bezier curve with translation and scaling. This is limited to gradients without sign change.
x0 | The X coordinate of the first point |
y0 | The Y coordinate of the first point |
x1 | The X coordinate of the second point |
y1 | The Y coordinate of the second point |
x2 | The X coordinate of the third point |
y2 | The Y coordinate of the third point |
col | The color to draw |
xOrigin | The X-origin, in display pixels, of the scaled pixel area |
yOrigin | The Y-origin, in display pixels, of the scaled pixel area |
xScale | The width of each scaled pixel |
yScale | The height of each scaled pixel |
void drawQuadBezier | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2, | ||
paletteColor_t | col ) |
Draw a one pixel wide quadratic Bezier curve.
x0 | The X coordinate of the first point |
y0 | The Y coordinate of the first point |
x1 | The X coordinate of the second point |
y1 | The Y coordinate of the second point |
x2 | The X coordinate of the third point |
y2 | The Y coordinate of the third point |
col | The color to draw |
void drawQuadBezierScaled | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2, | ||
paletteColor_t | col, | ||
int | xOrigin, | ||
int | yOrigin, | ||
int | xScale, | ||
int | yScale ) |
Draw a one pixel wide quadratic Bezier curve with translation and scaling.
x0 | The X coordinate of the first point |
y0 | The Y coordinate of the first point |
x1 | The X coordinate of the second point |
y1 | The Y coordinate of the second point |
x2 | The X coordinate of the third point |
y2 | The Y coordinate of the third point |
col | The color to draw |
xOrigin | The X-origin, in display pixels, of the scaled pixel area |
yOrigin | The Y-origin, in display pixels, of the scaled pixel area |
xScale | The width of each scaled pixel |
yScale | The height of each scaled pixel |
void drawQuadRationalBezierSeg | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2, | ||
float | w, | ||
paletteColor_t | col ) |
Draw a limited one pixel wide rational Bezier curve with squared weight.
x0 | The X coordinate of the first point |
y0 | The Y coordinate of the first point |
x1 | The X coordinate of the second point |
y1 | The Y coordinate of the second point |
x2 | The X coordinate of the third point |
y2 | The Y coordinate of the third point |
w | Squared Weight |
col | The color to draw |
void drawQuadRationalBezier | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2, | ||
float | w, | ||
paletteColor_t | col ) |
Draw any one pixel wide quadratic rational Bezier curve with squared weight.
x0 | The X coordinate of the first point |
y0 | The Y coordinate of the first point |
x1 | The X coordinate of the second point |
y1 | The Y coordinate of the second point |
x2 | The X coordinate of the third point |
y2 | The Y coordinate of the third point |
w | Squared Weight |
col | The color to draw |
void drawRotatedEllipse | ( | int | x, |
int | y, | ||
int | a, | ||
int | b, | ||
float | angle, | ||
paletteColor_t | col ) |
Draw an ellipse rotated by angle (radian)
x | The X coordinate of the center of the ellipse |
y | The Y coordinate of the center of the ellipse |
a | The X radius of the ellipse |
b | The Y radius of the ellipse |
angle | The angle, in radians, to rotate the ellipse by |
col | The color to draw |
void drawRotatedEllipseRect | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
long | zd, | ||
paletteColor_t | col ) |
Draw an ellipse, bounded by a rectangle, rotated (integer)
x0 | The X coordinate of the top left corner |
y0 | The Y coordinate of the top left corner |
x1 | The X coordinate of the bottom right corner |
y1 | The Y coordinate of the bottom right corner |
zd | The integer angle to rotate the ellipse |
col | The color to draw |
void drawCubicBezierSeg | ( | int | x0, |
int | y0, | ||
float | x1, | ||
float | y1, | ||
float | x2, | ||
float | y2, | ||
int | x3, | ||
int | y3, | ||
paletteColor_t | col ) |
Draw limited cubic Bezier segment.
x0 | The X coordinate of the first point |
y0 | The Y coordinate of the first point |
x1 | The X coordinate of the second point |
y1 | The Y coordinate of the second point |
x2 | The X coordinate of the third point |
y2 | The Y coordinate of the third point |
x3 | The X coordinate of the fourth point |
y3 | The Y coordinate of the fourth point |
col | The color to draw |
void drawCubicBezier | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2, | ||
int | x3, | ||
int | y3, | ||
paletteColor_t | col ) |
Draw any cubic Bezier curve.
x0 | The X coordinate of the first point |
y0 | The Y coordinate of the first point |
x1 | The X coordinate of the second point |
y1 | The Y coordinate of the second point |
x2 | The X coordinate of the third point |
y2 | The Y coordinate of the third point |
x3 | The X coordinate of the fourth point |
y3 | The Y coordinate of the fourth point |
col | The color to draw |
void drawCubicBezierScaled | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2, | ||
int | x3, | ||
int | y3, | ||
paletteColor_t | col, | ||
int | xOrigin, | ||
int | yOrigin, | ||
int | xScale, | ||
int | yScale ) |
Draw any cubic Bezier curve with translation and scaling.
x0 | The X coordinate of the first point |
y0 | The Y coordinate of the first point |
x1 | The X coordinate of the second point |
y1 | The Y coordinate of the second point |
x2 | The X coordinate of the third point |
y2 | The Y coordinate of the third point |
x3 | The X coordinate of the fourth point |
y3 | The Y coordinate of the fourth point |
col | The color to draw |
xOrigin | The X-origin, in display pixels, of the scaled pixel area |
yOrigin | The Y-origin, in display pixels, of the scaled pixel area |
xScale | The width of each scaled pixel |
yScale | The height of each scaled pixel |
void drawQuadSpline | ( | int | n, |
int | x[], | ||
int | y[], | ||
paletteColor_t | col ) |
Draw a quadratic spline. This overwrites the input arrays x and y.
n | The number of points in the spline |
x | The X coordinates of the points in the spline |
y | The Y coordinates of the points in the spline |
col | The color to draw |
void drawCubicSpline | ( | int | n, |
int | x[], | ||
int | y[], | ||
paletteColor_t | col ) |
Draw a cubic spline. This overwrites the input arrays x and y.
n | The number of points in the spline |
x | The X coordinates of the points in the spline |
y | The Y coordinates of the points in the spline |
col | The color to draw |
void initShapes | ( | void | ) |
Initialize shape drawing by making a static local pointer to the framebuffer This is done for speed reasons.