#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "SDL_gfxPrimitives.h"
#include "SDL_rotozoom.h"
#include "SDL_gfxPrimitives_font.h"
Go to the source code of this file.
Defines | |
#define | DEFAULT_ALPHA_PIXEL_ROUTINE |
#define | clip_xmin(surface) surface->clip_rect.x |
#define | clip_xmax(surface) surface->clip_rect.x+surface->clip_rect.w-1 |
#define | clip_ymin(surface) surface->clip_rect.y |
#define | clip_ymax(surface) surface->clip_rect.y+surface->clip_rect.h-1 |
#define | CLIP_LEFT_EDGE 0x1 |
#define | CLIP_RIGHT_EDGE 0x2 |
#define | CLIP_BOTTOM_EDGE 0x4 |
#define | CLIP_TOP_EDGE 0x8 |
#define | CLIP_INSIDE(a) (!a) |
#define | CLIP_REJECT(a, b) (a&b) |
#define | CLIP_ACCEPT(a, b) (!(a|b)) |
#define | ABS(a) (((a)<0) ? -(a) : (a)) |
#define | AAlevels 256 |
#define | AAbits 8 |
Functions | |
int | fastPixelColorNolock (SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color) |
Internal pixel drawing - fast, no blending, no locking, clipping. | |
int | fastPixelColorNolockNoclip (SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color) |
Internal pixel drawing - fast, no blending, no locking, no clipping. | |
int | fastPixelColor (SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color) |
Internal pixel drawing - fast, no blending, locking, clipping. | |
int | fastPixelRGBA (SDL_Surface *dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Internal pixel drawing - fast, no blending, locking, RGB input. | |
int | fastPixelRGBANolock (SDL_Surface *dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Internal pixel drawing - fast, no blending, no locking RGB input. | |
int | _putPixelAlpha (SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color, Uint8 alpha) |
Internal pixel drawing function with alpha blending where input color in in destination format. | |
int | pixelColor (SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color) |
Pixel draw with blending enabled if a<255. | |
int | pixelColorNolock (SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color) |
Pixel draw with blending enabled if a<255 - no surface locking. | |
int | _filledRectAlpha (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color, Uint8 alpha) |
Internal function to draw filled rectangle with alpha blending. | |
int | filledRectAlpha (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) |
Draw filled rectangle of RGBA color with alpha blending. | |
int | _HLineAlpha (SDL_Surface *dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color) |
Internal function to draw horizontal line of RGBA color with alpha blending. | |
int | _VLineAlpha (SDL_Surface *dst, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color) |
Internal function to draw vertical line of RGBA color with alpha blending. | |
int | pixelColorWeight (SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color, Uint32 weight) |
Pixel draw with blending enabled and using alpha weight on color. | |
int | pixelColorWeightNolock (SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color, Uint32 weight) |
Pixel draw with blending enabled and using alpha weight on color - no locking. | |
int | pixelRGBA (SDL_Surface *dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Pixel draw with blending enabled if a<255. | |
int | hlineColorStore (SDL_Surface *dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color) |
Draw horizontal line without blending;. | |
int | hlineRGBAStore (SDL_Surface *dst, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw horizontal line without blending. | |
int | hlineColor (SDL_Surface *dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color) |
Draw horizontal line with blending. | |
int | hlineRGBA (SDL_Surface *dst, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw horizontal line with blending. | |
int | vlineColor (SDL_Surface *dst, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color) |
Draw vertical line with blending. | |
int | vlineRGBA (SDL_Surface *dst, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw vertical line with blending. | |
int | rectangleColor (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) |
Draw rectangle with blending. | |
int | rectangleRGBA (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw rectangle with blending. | |
int | boxColor (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) |
Draw box (filled rectangle) with blending. | |
int | boxRGBA (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw box (filled rectangle) with blending. | |
int | lineColor (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) |
Draw line with alpha blending. | |
int | lineRGBA (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw line with alpha blending. | |
int | _aalineColor (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color, int draw_endpoint) |
Internal function to draw anti-aliased line with alpha blending and endpoint control. | |
int | aalineColor (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) |
Ddraw anti-aliased line with alpha blending. | |
int | aalineRGBA (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw anti-aliased line with alpha blending. | |
int | circleColor (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Uint32 color) |
Draw circle with blending. | |
int | circleRGBA (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw circle with blending. | |
int | arcColor (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color) |
Arc with blending. | |
int | arcRGBA (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Arc with blending. | |
int | aacircleColor (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Uint32 color) |
Draw anti-aliased circle with blending. | |
int | aacircleRGBA (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw anti-aliased circle with blending. | |
int | filledCircleColor (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Uint32 color) |
Draw filled circle with blending. | |
int | filledCircleRGBA (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw filled circle with blending. | |
int | ellipseColor (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color) |
Draw ellipse with blending. | |
int | ellipseRGBA (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw ellipse with blending. | |
int | aaellipseColor (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color) |
Draw anti-aliased ellipse with blending. | |
int | aaellipseRGBA (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw anti-aliased ellipse with blending. | |
int | filledEllipseColor (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color) |
Draw filled ellipse with blending. | |
int | filledEllipseRGBA (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw filled ellipse with blending. | |
int | _pieColor (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color, Uint8 filled) |
Internal float (low-speed) pie-calc implementation by drawing polygons. | |
int | pieColor (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color) |
Draw pie (outline) with alpha blending. | |
int | pieRGBA (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw pie (outline) with alpha blending. | |
int | filledPieColor (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color) |
Draw filled pie with alpha blending. | |
int | filledPieRGBA (SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw filled pie with alpha blending. | |
int | trigonColor (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color) |
Draw trigon (triangle outline) with alpha blending. | |
int | trigonRGBA (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw trigon (triangle outline) with alpha blending. | |
int | aatrigonColor (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color) |
Draw anti-aliased trigon (triangle outline) with alpha blending. | |
int | aatrigonRGBA (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw anti-aliased trigon (triangle outline) with alpha blending. | |
int | filledTrigonColor (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color) |
Draw filled trigon (triangle) with alpha blending. | |
int | filledTrigonRGBA (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw filled trigon (triangle) with alpha blending. | |
int | polygonColor (SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color) |
Draw polygon with alpha blending. | |
int | polygonRGBA (SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw polygon with alpha blending. | |
int | aapolygonColor (SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color) |
Draw anti-aliased polygon with alpha blending. | |
int | aapolygonRGBA (SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw anti-aliased polygon with alpha blending. | |
int | _gfxPrimitivesCompareInt (const void *a, const void *b) |
Internal helper qsort callback functions used in filled polygon drawing. | |
int | filledPolygonColorMT (SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color, int **polyInts, int *polyAllocated) |
Draw filled polygon with alpha blending (multi-threaded capable). | |
int | filledPolygonRGBAMT (SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a, int **polyInts, int *polyAllocated) |
Draw filled polygon with alpha blending (multi-threaded capable). | |
int | filledPolygonColor (SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color) |
Draw filled polygon with alpha blending. | |
int | filledPolygonRGBA (SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw filled polygon with alpha blending. | |
int | _HLineTextured (SDL_Surface *dst, Sint16 x1, Sint16 x2, Sint16 y, SDL_Surface *texture, int texture_dx, int texture_dy) |
Internal function to draw a textured horizontal line. | |
int | texturedPolygonMT (SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, SDL_Surface *texture, int texture_dx, int texture_dy, int **polyInts, int *polyAllocated) |
Draws a polygon filled with the given texture (Multi-Threading Capable). | |
int | texturedPolygon (SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, SDL_Surface *texture, int texture_dx, int texture_dy) |
Draws a polygon filled with the given texture. | |
void | gfxPrimitivesSetFont (const void *fontdata, Uint32 cw, Uint32 ch) |
Sets or resets the current global font data. | |
void | gfxPrimitivesSetFontRotation (Uint32 rotation) |
Sets current global font character rotation steps. | |
int | characterColor (SDL_Surface *dst, Sint16 x, Sint16 y, char c, Uint32 color) |
Draw a character of the currently set font. | |
int | characterRGBA (SDL_Surface *dst, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw a character of the currently set font. | |
int | stringColor (SDL_Surface *dst, Sint16 x, Sint16 y, const char *s, Uint32 color) |
Draw a string in the currently set font. | |
int | stringRGBA (SDL_Surface *dst, Sint16 x, Sint16 y, const char *s, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw a string in the currently set font. | |
double | _evaluateBezier (double *data, int ndata, double t) |
Internal function to calculate bezier interpolator of data array with ndata values at position 't'. | |
int | bezierColor (SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, int s, Uint32 color) |
Draw a bezier curve with alpha blending. | |
int | bezierRGBA (SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, int s, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
Draw a bezier curve with alpha blending. |
#define AAbits 8 |
Definition at line 2170 of file SDL_gfxPrimitives.c.
#define AAlevels 256 |
Definition at line 2169 of file SDL_gfxPrimitives.c.
#define ABS | ( | a | ) | (((a)<0) ? -(a) : (a)) |
Definition at line 1936 of file SDL_gfxPrimitives.c.
#define CLIP_ACCEPT | ( | a, | |||
b | ) | (!(a|b)) |
Definition at line 1594 of file SDL_gfxPrimitives.c.
#define CLIP_BOTTOM_EDGE 0x4 |
Definition at line 1590 of file SDL_gfxPrimitives.c.
#define CLIP_INSIDE | ( | a | ) | (!a) |
Definition at line 1592 of file SDL_gfxPrimitives.c.
#define CLIP_LEFT_EDGE 0x1 |
Definition at line 1588 of file SDL_gfxPrimitives.c.
#define CLIP_REJECT | ( | a, | |||
b | ) | (a&b) |
Definition at line 1593 of file SDL_gfxPrimitives.c.
#define CLIP_RIGHT_EDGE 0x2 |
Definition at line 1589 of file SDL_gfxPrimitives.c.
#define CLIP_TOP_EDGE 0x8 |
Definition at line 1591 of file SDL_gfxPrimitives.c.
#define clip_xmax | ( | surface | ) | surface->clip_rect.x+surface->clip_rect.w-1 |
Definition at line 26 of file SDL_gfxPrimitives.c.
#define clip_xmin | ( | surface | ) | surface->clip_rect.x |
Definition at line 25 of file SDL_gfxPrimitives.c.
#define clip_ymax | ( | surface | ) | surface->clip_rect.y+surface->clip_rect.h-1 |
Definition at line 28 of file SDL_gfxPrimitives.c.
#define clip_ymin | ( | surface | ) | surface->clip_rect.y |
Definition at line 27 of file SDL_gfxPrimitives.c.
#define DEFAULT_ALPHA_PIXEL_ROUTINE |
Definition at line 20 of file SDL_gfxPrimitives.c.
int _aalineColor | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | y1, | |||
Sint16 | x2, | |||
Sint16 | y2, | |||
Uint32 | color, | |||
int | draw_endpoint | |||
) |
Internal function to draw anti-aliased line with alpha blending and endpoint control.
This implementation of the Wu antialiasing code is based on Mike Abrash's DDJ article which was reprinted as Chapter 42 of his Graphics Programming Black Book, but has been optimized to work with SDL and utilizes 32-bit fixed-point arithmetic by A. Schiffler. The endpoint control allows the supression to draw the last pixel useful for rendering continous aa-lines with alpha<255.
dst | The surface to draw on. | |
x1 | X coordinate of the first point of the aa-line. | |
y1 | Y coordinate of the first point of the aa-line. | |
x2 | X coordinate of the second point of the aa-line. | |
y2 | Y coordinate of the second point of the aa-line. | |
color | The color value of the aa-line to draw (0xRRGGBBAA). | |
draw_endpoint | Flag indicating if the endpoint should be drawn; draw if non-zero. |
Definition at line 2192 of file SDL_gfxPrimitives.c.
double _evaluateBezier | ( | double * | data, | |
int | ndata, | |||
double | t | |||
) |
Internal function to calculate bezier interpolator of data array with ndata values at position 't'.
data | Array of values. | |
ndata | Size of array. | |
t | Position for which to calculate interpolated value. t should be between [0, ndata]. |
Definition at line 5733 of file SDL_gfxPrimitives.c.
int _filledRectAlpha | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | y1, | |||
Sint16 | x2, | |||
Sint16 | y2, | |||
Uint32 | color, | |||
Uint8 | alpha | |||
) |
Internal function to draw filled rectangle with alpha blending.
Assumes color is in destination format.
dst | The surface to draw on. | |
x1 | X coordinate of the first corner (upper left) of the rectangle. | |
y1 | Y coordinate of the first corner (upper left) of the rectangle. | |
x2 | X coordinate of the second corner (lower right) of the rectangle. | |
y2 | Y coordinate of the second corner (lower right) of the rectangle. | |
color | The color value of the rectangle to draw (0xRRGGBBAA). | |
alpha | Alpha blending amount for pixels. |
Definition at line 535 of file SDL_gfxPrimitives.c.
int _gfxPrimitivesCompareInt | ( | const void * | a, | |
const void * | b | |||
) |
Internal helper qsort callback functions used in filled polygon drawing.
a | The surface to draw on. | |
b | Vertex array containing X coordinates of the points of the polygon. |
Definition at line 4744 of file SDL_gfxPrimitives.c.
int _HLineAlpha | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | x2, | |||
Sint16 | y, | |||
Uint32 | color | |||
) |
Internal function to draw horizontal line of RGBA color with alpha blending.
dst | The surface to draw on. | |
x1 | X coordinate of the first point (i.e. left) of the line. | |
x2 | X coordinate of the second point (i.e. right) of the line. | |
y | Y coordinate of the points of the line. | |
color | The color value of the line to draw (0xRRGGBBAA). |
Definition at line 813 of file SDL_gfxPrimitives.c.
int _HLineTextured | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | x2, | |||
Sint16 | y, | |||
SDL_Surface * | texture, | |||
int | texture_dx, | |||
int | texture_dy | |||
) |
Internal function to draw a textured horizontal line.
dst | The surface to draw on. | |
x1 | X coordinate of the first point (i.e. left) of the line. | |
x2 | X coordinate of the second point (i.e. right) of the line. | |
y | Y coordinate of the points of the line. | |
texture | The texture surface to retrieve color information from. | |
texture_dx | The X offset for the texture lookup. | |
texture_dy | The Y offset for the textured lookup. |
Definition at line 5008 of file SDL_gfxPrimitives.c.
int _pieColor | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rad, | |||
Sint16 | start, | |||
Sint16 | end, | |||
Uint32 | color, | |||
Uint8 | filled | |||
) |
Internal float (low-speed) pie-calc implementation by drawing polygons.
Note: Determines vertex array and uses polygon or filledPolygon drawing routines to render.
dst | The surface to draw on. | |
x | X coordinate of the center of the pie. | |
y | Y coordinate of the center of the pie. | |
rad | Radius in pixels of the pie. | |
start | Starting radius in degrees of the pie. | |
end | Ending radius in degrees of the pie. | |
color | The color value of the pie to draw (0xRRGGBBAA). | |
filled | Flag indicating if the pie should be filled (=1) or not (=0). |
Definition at line 4144 of file SDL_gfxPrimitives.c.
int _putPixelAlpha | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Uint32 | color, | |||
Uint8 | alpha | |||
) |
Internal pixel drawing function with alpha blending where input color in in destination format.
Contains two alternative 32 bit alpha blending routines which can be enabled at the source level with the defines DEFAULT_ALPHA_PIXEL_ROUTINE or EXPERIMENTAL_ALPHA_PIXEL_ROUTINE. Only the bits up to the surface depth are significant in the color value.
dst | The surface to draw on. | |
x | The horizontal coordinate of the pixel. | |
y | The vertical position of the pixel. | |
color | The color value of the pixel to draw. | |
alpha | The blend factor to apply while drawing. |
Definition at line 239 of file SDL_gfxPrimitives.c.
int _VLineAlpha | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y1, | |||
Sint16 | y2, | |||
Uint32 | color | |||
) |
Internal function to draw vertical line of RGBA color with alpha blending.
dst | The surface to draw on. | |
x | X coordinate of the points of the line. | |
y1 | Y coordinate of the first point (top) of the line. | |
y2 | Y coordinate of the second point (bottom) of the line. | |
color | The color value of the line to draw (0xRRGGBBAA). |
Definition at line 830 of file SDL_gfxPrimitives.c.
int aacircleColor | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rad, | |||
Uint32 | color | |||
) |
Draw anti-aliased circle with blending.
Note: The AA-circle routine is based on AA-ellipse with identical radii.
dst | The surface to draw on. | |
x | X coordinate of the center of the aa-circle. | |
y | Y coordinate of the center of the aa-circle. | |
rad | Radius in pixels of the aa-circle. | |
color | The color value of the aa-circle to draw (0xRRGGBBAA). |
Definition at line 3117 of file SDL_gfxPrimitives.c.
int aacircleRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rad, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw anti-aliased circle with blending.
dst | The surface to draw on. | |
x | X coordinate of the center of the aa-circle. | |
y | Y coordinate of the center of the aa-circle. | |
rad | Radius in pixels of the aa-circle. | |
r | The red value of the aa-circle to draw. | |
g | The green value of the aa-circle to draw. | |
b | The blue value of the aa-circle to draw. | |
a | The alpha value of the aa-circle to draw. |
Definition at line 3136 of file SDL_gfxPrimitives.c.
int aaellipseColor | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rx, | |||
Sint16 | ry, | |||
Uint32 | color | |||
) |
Draw anti-aliased ellipse with blending.
Note: Based on code from Anders Lindstroem, which is based on code from sge library, which is based on code from TwinLib.
dst | The surface to draw on. | |
x | X coordinate of the center of the aa-ellipse. | |
y | Y coordinate of the center of the aa-ellipse. | |
rx | Horizontal radius in pixels of the aa-ellipse. | |
ry | Vertical radius in pixels of the aa-ellipse. | |
color | The color value of the aa-ellipse to draw (0xRRGGBBAA). |
Definition at line 3679 of file SDL_gfxPrimitives.c.
int aaellipseRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rx, | |||
Sint16 | ry, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw anti-aliased ellipse with blending.
dst | The surface to draw on. | |
x | X coordinate of the center of the aa-ellipse. | |
y | Y coordinate of the center of the aa-ellipse. | |
rx | Horizontal radius in pixels of the aa-ellipse. | |
ry | Vertical radius in pixels of the aa-ellipse. | |
r | The red value of the aa-ellipse to draw. | |
g | The green value of the aa-ellipse to draw. | |
b | The blue value of the aa-ellipse to draw. | |
a | The alpha value of the aa-ellipse to draw. |
Definition at line 3919 of file SDL_gfxPrimitives.c.
int aalineColor | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | y1, | |||
Sint16 | x2, | |||
Sint16 | y2, | |||
Uint32 | color | |||
) |
Ddraw anti-aliased line with alpha blending.
dst | The surface to draw on. | |
x1 | X coordinate of the first point of the aa-line. | |
y1 | Y coordinate of the first point of the aa-line. | |
x2 | X coordinate of the second point of the aa-line. | |
y2 | Y coordinate of the second point of the aa-line. | |
color | The color value of the aa-line to draw (0xRRGGBBAA). |
Definition at line 2431 of file SDL_gfxPrimitives.c.
int aalineRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | y1, | |||
Sint16 | x2, | |||
Sint16 | y2, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw anti-aliased line with alpha blending.
dst | The surface to draw on. | |
x1 | X coordinate of the first point of the aa-line. | |
y1 | Y coordinate of the first point of the aa-line. | |
x2 | X coordinate of the second point of the aa-line. | |
y2 | Y coordinate of the second point of the aa-line. | |
r | The red value of the aa-line to draw. | |
g | The green value of the aa-line to draw. | |
b | The blue value of the aa-line to draw. | |
a | The alpha value of the aa-line to draw. |
Definition at line 2451 of file SDL_gfxPrimitives.c.
int aapolygonColor | ( | SDL_Surface * | dst, | |
const Sint16 * | vx, | |||
const Sint16 * | vy, | |||
int | n, | |||
Uint32 | color | |||
) |
Draw anti-aliased polygon with alpha blending.
dst | The surface to draw on. | |
vx | Vertex array containing X coordinates of the points of the aa-polygon. | |
vy | Vertex array containing Y coordinates of the points of the aa-polygon. | |
n | Number of points in the vertex array. Minimum number is 3. | |
color | The color value of the aa-polygon to draw (0xRRGGBBAA). |
Definition at line 4658 of file SDL_gfxPrimitives.c.
int aapolygonRGBA | ( | SDL_Surface * | dst, | |
const Sint16 * | vx, | |||
const Sint16 * | vy, | |||
int | n, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw anti-aliased polygon with alpha blending.
dst | The surface to draw on. | |
vx | Vertex array containing X coordinates of the points of the aa-polygon. | |
vy | Vertex array containing Y coordinates of the points of the aa-polygon. | |
n | Number of points in the vertex array. Minimum number is 3. | |
r | The red value of the aa-polygon to draw. | |
g | The green value of the aa-polygon to draw. | |
b | The blue value of the aa-polygon to draw. | |
a | The alpha value of the aa-polygon to draw. |
Definition at line 4726 of file SDL_gfxPrimitives.c.
int aatrigonColor | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | y1, | |||
Sint16 | x2, | |||
Sint16 | y2, | |||
Sint16 | x3, | |||
Sint16 | y3, | |||
Uint32 | color | |||
) |
Draw anti-aliased trigon (triangle outline) with alpha blending.
Note: Creates vertex array and uses aapolygon routine to render.
dst | The surface to draw on. | |
x1 | X coordinate of the first point of the aa-trigon. | |
y1 | Y coordinate of the first point of the aa-trigon. | |
x2 | X coordinate of the second point of the aa-trigon. | |
y2 | Y coordinate of the second point of the aa-trigon. | |
x3 | X coordinate of the third point of the aa-trigon. | |
y3 | Y coordinate of the third point of the aa-trigon. | |
color | The color value of the aa-trigon to draw (0xRRGGBBAA). |
Definition at line 4440 of file SDL_gfxPrimitives.c.
int aatrigonRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | y1, | |||
Sint16 | x2, | |||
Sint16 | y2, | |||
Sint16 | x3, | |||
Sint16 | y3, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw anti-aliased trigon (triangle outline) with alpha blending.
dst | The surface to draw on. | |
x1 | X coordinate of the first point of the aa-trigon. | |
y1 | Y coordinate of the first point of the aa-trigon. | |
x2 | X coordinate of the second point of the aa-trigon. | |
y2 | Y coordinate of the second point of the aa-trigon. | |
x3 | X coordinate of the third point of the aa-trigon. | |
y3 | Y coordinate of the third point of the aa-trigon. | |
r | The red value of the aa-trigon to draw. | |
g | The green value of the aa-trigon to draw. | |
b | The blue value of the aa-trigon to draw. | |
a | The alpha value of the aa-trigon to draw. |
Definition at line 4472 of file SDL_gfxPrimitives.c.
int arcColor | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rad, | |||
Sint16 | start, | |||
Sint16 | end, | |||
Uint32 | color | |||
) |
Arc with blending.
Note Arc drawing is based on circle algorithm by A. Schiffler and written by D. Raber. Calculates which octants arc goes through and renders pixels accordingly.
dst | The surface to draw on. | |
x | X coordinate of the center of the arc. | |
y | Y coordinate of the center of the arc. | |
rad | Radius in pixels of the arc. | |
start | Starting radius in degrees of the arc. | |
end | Ending radius in degrees of the arc. | |
color | The color value of the arc to draw (0xRRGGBBAA). |
Definition at line 2722 of file SDL_gfxPrimitives.c.
int arcRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rad, | |||
Sint16 | start, | |||
Sint16 | end, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Arc with blending.
dst | The surface to draw on. | |
x | X coordinate of the center of the arc. | |
y | Y coordinate of the center of the arc. | |
rad | Radius in pixels of the arc. | |
start | Starting radius in degrees of the arc. | |
end | Ending radius in degrees of the arc. | |
r | The red value of the arc to draw. | |
g | The green value of the arc to draw. | |
b | The blue value of the arc to draw. | |
a | The alpha value of the arc to draw. |
Definition at line 3093 of file SDL_gfxPrimitives.c.
int bezierColor | ( | SDL_Surface * | dst, | |
const Sint16 * | vx, | |||
const Sint16 * | vy, | |||
int | n, | |||
int | s, | |||
Uint32 | color | |||
) |
Draw a bezier curve with alpha blending.
dst | The surface to draw on. | |
vx | Vertex array containing X coordinates of the points of the bezier curve. | |
vy | Vertex array containing Y coordinates of the points of the bezier curve. | |
n | Number of points in the vertex array. Minimum number is 3. | |
s | Number of steps for the interpolation. Minimum number is 2. | |
color | The color value of the bezier curve to draw (0xRRGGBBAA). |
Definition at line 5792 of file SDL_gfxPrimitives.c.
int bezierRGBA | ( | SDL_Surface * | dst, | |
const Sint16 * | vx, | |||
const Sint16 * | vy, | |||
int | n, | |||
int | s, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw a bezier curve with alpha blending.
dst | The surface to draw on. | |
vx | Vertex array containing X coordinates of the points of the bezier curve. | |
vy | Vertex array containing Y coordinates of the points of the bezier curve. | |
n | Number of points in the vertex array. Minimum number is 3. | |
s | Number of steps for the interpolation. Minimum number is 2. | |
r | The red value of the bezier curve to draw. | |
g | The green value of the bezier curve to draw. | |
b | The blue value of the bezier curve to draw. | |
a | The alpha value of the bezier curve to draw. |
Definition at line 5867 of file SDL_gfxPrimitives.c.
int boxColor | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | y1, | |||
Sint16 | x2, | |||
Sint16 | y2, | |||
Uint32 | color | |||
) |
Draw box (filled rectangle) with blending.
dst | The surface to draw on. | |
x1 | X coordinate of the first point (i.e. top right) of the box. | |
y1 | Y coordinate of the first point (i.e. top right) of the box. | |
x2 | X coordinate of the second point (i.e. bottom left) of the box. | |
y2 | Y coordinate of the second point (i.e. bottom left) of the box. | |
color | The color value of the box to draw (0xRRGGBBAA). |
Definition at line 1710 of file SDL_gfxPrimitives.c.
int boxRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | y1, | |||
Sint16 | x2, | |||
Sint16 | y2, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw box (filled rectangle) with blending.
dst | The surface to draw on. | |
x1 | X coordinate of the first point (i.e. top right) of the box. | |
y1 | Y coordinate of the first point (i.e. top right) of the box. | |
x2 | X coordinate of the second point (i.e. bottom left) of the box. | |
y2 | Y coordinate of the second point (i.e. bottom left) of the box. | |
r | The red value of the box to draw. | |
g | The green value of the box to draw. | |
b | The blue value of the box to draw. | |
a | The alpha value of the box to draw. |
Definition at line 1922 of file SDL_gfxPrimitives.c.
int characterColor | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
char | c, | |||
Uint32 | color | |||
) |
Draw a character of the currently set font.
On first call for a particular character and color combination, the function needs to generate the character surface (slower. Subsequent calls blit a cached surface (fast). Uses alpha blending if A<255 in color.
dst | The surface to draw on. | |
x | X (horizontal) coordinate of the upper left corner of the character. | |
y | Y (vertical) coordinate of the upper left corner of the character. | |
c | The character to draw. | |
color | The color value of the character to draw (0xRRGGBBAA). |
Definition at line 5479 of file SDL_gfxPrimitives.c.
int characterRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
char | c, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw a character of the currently set font.
dst | The surface to draw on. | |
x | X (horizontal) coordinate of the upper left corner of the character. | |
y | Y (vertical) coordinate of the upper left corner of the character. | |
c | The character to draw. | |
r | The red value of the character to draw. | |
g | The green value of the character to draw. | |
b | The blue value of the character to draw. | |
a | The alpha value of the character to draw. |
Definition at line 5648 of file SDL_gfxPrimitives.c.
int circleColor | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rad, | |||
Uint32 | color | |||
) |
Draw circle with blending.
Note: Circle drawing routine is based on an algorithms from the sge library, but modified by A. Schiffler for multiple pixel-draw removal and other minor speedup changes.
dst | The surface to draw on. | |
x | X coordinate of the center of the circle. | |
y | Y coordinate of the center of the circle. | |
rad | Radius in pixels of the circle. | |
color | The color value of the circle to draw (0xRRGGBBAA). |
Definition at line 2475 of file SDL_gfxPrimitives.c.
int circleRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rad, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw circle with blending.
dst | The surface to draw on. | |
x | X coordinate of the center of the circle. | |
y | Y coordinate of the center of the circle. | |
rad | Radius in pixels of the circle. | |
r | The red value of the circle to draw. | |
g | The green value of the circle to draw. | |
b | The blue value of the circle to draw. | |
a | The alpha value of the circle to draw. |
Definition at line 2695 of file SDL_gfxPrimitives.c.
int ellipseColor | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rx, | |||
Sint16 | ry, | |||
Uint32 | color | |||
) |
Draw ellipse with blending.
Note: Based on algorithms from sge library with modifications by A. Schiffler for multiple-pixel draw removal and other minor speedup changes.
dst | The surface to draw on. | |
x | X coordinate of the center of the ellipse. | |
y | Y coordinate of the center of the ellipse. | |
rx | Horizontal radius in pixels of the ellipse. | |
ry | Vertical radius in pixels of the ellipse. | |
color | The color value of the ellipse to draw (0xRRGGBBAA). |
Definition at line 3314 of file SDL_gfxPrimitives.c.
int ellipseRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rx, | |||
Sint16 | ry, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw ellipse with blending.
dst | The surface to draw on. | |
x | X coordinate of the center of the ellipse. | |
y | Y coordinate of the center of the ellipse. | |
rx | Horizontal radius in pixels of the ellipse. | |
ry | Vertical radius in pixels of the ellipse. | |
r | The red value of the ellipse to draw. | |
g | The green value of the ellipse to draw. | |
b | The blue value of the ellipse to draw. | |
a | The alpha value of the ellipse to draw. |
Definition at line 3628 of file SDL_gfxPrimitives.c.
int fastPixelColor | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Uint32 | color | |||
) |
Internal pixel drawing - fast, no blending, locking, clipping.
dst | The surface to draw on. | |
x | The horizontal coordinate of the pixel. | |
y | The vertical position of the pixel. | |
color | The color value of the pixel to draw. |
Definition at line 143 of file SDL_gfxPrimitives.c.
int fastPixelColorNolock | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Uint32 | color | |||
) |
Internal pixel drawing - fast, no blending, no locking, clipping.
dst | The surface to draw on. | |
x | The horizontal coordinate of the pixel. | |
y | The vertical position of the pixel. | |
color | The color value of the pixel to draw. |
Definition at line 40 of file SDL_gfxPrimitives.c.
int fastPixelColorNolockNoclip | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Uint32 | color | |||
) |
Internal pixel drawing - fast, no blending, no locking, no clipping.
Function is faster but dangerous since no clipping check is done. Code needs to make sure we stay in surface bounds before calling.
dst | The surface to draw on. | |
x | The horizontal coordinate of the pixel. | |
y | The vertical position of the pixel. | |
color | The color value of the pixel to draw. |
Definition at line 97 of file SDL_gfxPrimitives.c.
int fastPixelRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Internal pixel drawing - fast, no blending, locking, RGB input.
dst | The surface to draw on. | |
x | The horizontal coordinate of the pixel. | |
y | The vertical position of the pixel. | |
r | The red value of the pixel to draw. | |
g | The green value of the pixel to draw. | |
b | The blue value of the pixel to draw. | |
a | The alpha value of the pixel to draw. |
Definition at line 181 of file SDL_gfxPrimitives.c.
int fastPixelRGBANolock | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Internal pixel drawing - fast, no blending, no locking RGB input.
dst | The surface to draw on. | |
x | The horizontal coordinate of the pixel. | |
y | The vertical position of the pixel. | |
r | The red value of the pixel to draw. | |
g | The green value of the pixel to draw. | |
b | The blue value of the pixel to draw. | |
a | The alpha value of the pixel to draw. |
Definition at line 209 of file SDL_gfxPrimitives.c.
int filledCircleColor | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rad, | |||
Uint32 | color | |||
) |
Draw filled circle with blending.
Note: Based on algorithms from sge library with modifications by A. Schiffler for multiple-hline draw removal and other minor speedup changes.
dst | The surface to draw on. | |
x | X coordinate of the center of the filled circle. | |
y | Y coordinate of the center of the filled circle. | |
rad | Radius in pixels of the filled circle. | |
color | The color value of the filled circle to draw (0xRRGGBBAA). |
Definition at line 3161 of file SDL_gfxPrimitives.c.
int filledCircleRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rad, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw filled circle with blending.
dst | The surface to draw on. | |
x | X coordinate of the center of the filled circle. | |
y | Y coordinate of the center of the filled circle. | |
rad | Radius in pixels of the filled circle. | |
r | The red value of the filled circle to draw. | |
g | The green value of the filled circle to draw. | |
b | The blue value of the filled circle to draw. | |
a | The alpha value of the filled circle to draw. |
Definition at line 3288 of file SDL_gfxPrimitives.c.
int filledEllipseColor | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rx, | |||
Sint16 | ry, | |||
Uint32 | color | |||
) |
Draw filled ellipse with blending.
Note: Based on algorithm from sge library with multiple-hline draw removal and other speedup changes.
dst | The surface to draw on. | |
x | X coordinate of the center of the filled ellipse. | |
y | Y coordinate of the center of the filled ellipse. | |
rx | Horizontal radius in pixels of the filled ellipse. | |
ry | Vertical radius in pixels of the filled ellipse. | |
color | The color value of the filled ellipse to draw (0xRRGGBBAA). |
Definition at line 3949 of file SDL_gfxPrimitives.c.
int filledEllipseRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rx, | |||
Sint16 | ry, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw filled ellipse with blending.
dst | The surface to draw on. | |
x | X coordinate of the center of the filled ellipse. | |
y | Y coordinate of the center of the filled ellipse. | |
rx | Horizontal radius in pixels of the filled ellipse. | |
ry | Vertical radius in pixels of the filled ellipse. | |
r | The red value of the filled ellipse to draw. | |
g | The green value of the filled ellipse to draw. | |
b | The blue value of the filled ellipse to draw. | |
a | The alpha value of the filled ellipse to draw. |
Definition at line 4117 of file SDL_gfxPrimitives.c.
int filledPieColor | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rad, | |||
Sint16 | start, | |||
Sint16 | end, | |||
Uint32 | color | |||
) |
Draw filled pie with alpha blending.
dst | The surface to draw on. | |
x | X coordinate of the center of the filled pie. | |
y | Y coordinate of the center of the filled pie. | |
rad | Radius in pixels of the filled pie. | |
start | Starting radius in degrees of the filled pie. | |
end | Ending radius in degrees of the filled pie. | |
color | The color value of the filled pie to draw (0xRRGGBBAA). |
Definition at line 4328 of file SDL_gfxPrimitives.c.
int filledPieRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rad, | |||
Sint16 | start, | |||
Sint16 | end, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw filled pie with alpha blending.
dst | The surface to draw on. | |
x | X coordinate of the center of the filled pie. | |
y | Y coordinate of the center of the filled pie. | |
rad | Radius in pixels of the filled pie. | |
start | Starting radius in degrees of the filled pie. | |
end | Ending radius in degrees of the filled pie. | |
r | The red value of the filled pie to draw. | |
g | The green value of the filled pie to draw. | |
b | The blue value of the filled pie to draw. | |
a | The alpha value of the filled pie to draw. |
Definition at line 4349 of file SDL_gfxPrimitives.c.
int filledPolygonColor | ( | SDL_Surface * | dst, | |
const Sint16 * | vx, | |||
const Sint16 * | vy, | |||
int | n, | |||
Uint32 | color | |||
) |
Draw filled polygon with alpha blending.
Note: Standard filledPolygon function is calling multithreaded version with NULL parameters to use the global vertex cache.
dst | The surface to draw on. | |
vx | Vertex array containing X coordinates of the points of the filled polygon. | |
vy | Vertex array containing Y coordinates of the points of the filled polygon. | |
n | Number of points in the vertex array. Minimum number is 3. | |
color | The color value of the filled polygon to draw (0xRRGGBBAA). |
Definition at line 4965 of file SDL_gfxPrimitives.c.
int filledPolygonColorMT | ( | SDL_Surface * | dst, | |
const Sint16 * | vx, | |||
const Sint16 * | vy, | |||
int | n, | |||
Uint32 | color, | |||
int ** | polyInts, | |||
int * | polyAllocated | |||
) |
Draw filled polygon with alpha blending (multi-threaded capable).
Note: The last two parameters are optional; but are required for multithreaded operation.
dst | The surface to draw on. | |
vx | Vertex array containing X coordinates of the points of the filled polygon. | |
vy | Vertex array containing Y coordinates of the points of the filled polygon. | |
n | Number of points in the vertex array. Minimum number is 3. | |
color | The color value of the filled polygon to draw (0xRRGGBBAA). | |
polyInts | Preallocated, temporary vertex array used for sorting vertices. Required for multithreaded operation; set to NULL otherwise. | |
polyAllocated | Flag indicating if temporary vertex array was allocated. Required for multithreaded operation; set to NULL otherwise. |
Definition at line 4778 of file SDL_gfxPrimitives.c.
int filledPolygonRGBA | ( | SDL_Surface * | dst, | |
const Sint16 * | vx, | |||
const Sint16 * | vy, | |||
int | n, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw filled polygon with alpha blending.
dst | The surface to draw on. | |
vx | Vertex array containing X coordinates of the points of the filled polygon. | |
vy | Vertex array containing Y coordinates of the points of the filled polygon. | |
n | Number of points in the vertex array. Minimum number is 3. | |
r | The red value of the filled polygon to draw. | |
g | The green value of the filled polygon to draw. | |
b | The blue value of the filed polygon to draw. | |
a | The alpha value of the filled polygon to draw. |
Definition at line 4987 of file SDL_gfxPrimitives.c.
int filledPolygonRGBAMT | ( | SDL_Surface * | dst, | |
const Sint16 * | vx, | |||
const Sint16 * | vy, | |||
int | n, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a, | |||
int ** | polyInts, | |||
int * | polyAllocated | |||
) |
Draw filled polygon with alpha blending (multi-threaded capable).
Note: The last two parameters are optional; but are required for multithreaded operation.
dst | The surface to draw on. | |
vx | Vertex array containing X coordinates of the points of the filled polygon. | |
vy | Vertex array containing Y coordinates of the points of the filled polygon. | |
n | Number of points in the vertex array. Minimum number is 3. | |
r | The red value of the filled polygon to draw. | |
g | The green value of the filled polygon to draw. | |
b | The blue value of the filed polygon to draw. | |
a | The alpha value of the filled polygon to draw. | |
polyInts | Preallocated, temporary vertex array used for sorting vertices. Required for multithreaded operation; set to NULL otherwise. | |
polyAllocated | Flag indicating if temporary vertex array was allocated. Required for multithreaded operation; set to NULL otherwise. |
Definition at line 4943 of file SDL_gfxPrimitives.c.
int filledRectAlpha | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | y1, | |||
Sint16 | x2, | |||
Sint16 | y2, | |||
Uint32 | color | |||
) |
Draw filled rectangle of RGBA color with alpha blending.
dst | The surface to draw on. | |
x1 | X coordinate of the first corner (upper left) of the rectangle. | |
y1 | Y coordinate of the first corner (upper left) of the rectangle. | |
x2 | X coordinate of the second corner (lower right) of the rectangle. | |
y2 | Y coordinate of the second corner (lower right) of the rectangle. | |
color | The color value of the rectangle to draw (0xRRGGBBAA). |
Definition at line 764 of file SDL_gfxPrimitives.c.
int filledTrigonColor | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | y1, | |||
Sint16 | x2, | |||
Sint16 | y2, | |||
Sint16 | x3, | |||
Sint16 | y3, | |||
Uint32 | color | |||
) |
Draw filled trigon (triangle) with alpha blending.
Note: Creates vertex array and uses aapolygon routine to render.
dst | The surface to draw on. | |
x1 | X coordinate of the first point of the filled trigon. | |
y1 | Y coordinate of the first point of the filled trigon. | |
x2 | X coordinate of the second point of the filled trigon. | |
y2 | Y coordinate of the second point of the filled trigon. | |
x3 | X coordinate of the third point of the filled trigon. | |
y3 | Y coordinate of the third point of the filled trigon. | |
color | The color value of the filled trigon to draw (0xRRGGBBAA). |
Definition at line 4506 of file SDL_gfxPrimitives.c.
int filledTrigonRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | y1, | |||
Sint16 | x2, | |||
Sint16 | y2, | |||
Sint16 | x3, | |||
Sint16 | y3, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw filled trigon (triangle) with alpha blending.
Note: Creates vertex array and uses aapolygon routine to render.
dst | The surface to draw on. | |
x1 | X coordinate of the first point of the filled trigon. | |
y1 | Y coordinate of the first point of the filled trigon. | |
x2 | X coordinate of the second point of the filled trigon. | |
y2 | Y coordinate of the second point of the filled trigon. | |
x3 | X coordinate of the third point of the filled trigon. | |
y3 | Y coordinate of the third point of the filled trigon. | |
r | The red value of the filled trigon to draw. | |
g | The green value of the filled trigon to draw. | |
b | The blue value of the filled trigon to draw. | |
a | The alpha value of the filled trigon to draw. |
Definition at line 4540 of file SDL_gfxPrimitives.c.
void gfxPrimitivesSetFont | ( | const void * | fontdata, | |
Uint32 | cw, | |||
Uint32 | ch | |||
) |
Sets or resets the current global font data.
The font data array is organized in follows: [fontdata] = [character 0][character 1]...[character 255] where [character n] = [byte 1 row 1][byte 2 row 1]...[byte {pitch} row 1][byte 1 row 2] ...[byte {pitch} row height] where [byte n] = [bit 0]...[bit 7] where [bit n] = [0 for transparent pixel|1 for colored pixel]
fontdata | Pointer to array of font data. Set to NULL, to reset global font to the default 8x8 font. | |
cw | Width of character in bytes. Ignored if fontdata==NULL. | |
ch | Height of character in bytes. Ignored if fontdata==NULL. |
Definition at line 5386 of file SDL_gfxPrimitives.c.
void gfxPrimitivesSetFontRotation | ( | Uint32 | rotation | ) |
Sets current global font character rotation steps.
Default is 0 (no rotation). 1 = 90deg clockwise. 2 = 180deg clockwise. 3 = 270deg clockwise. Changing the rotation, will reset the character cache.
rotation | Number of 90deg clockwise steps to rotate |
Definition at line 5432 of file SDL_gfxPrimitives.c.
int hlineColor | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | x2, | |||
Sint16 | y, | |||
Uint32 | color | |||
) |
Draw horizontal line with blending.
dst | The surface to draw on. | |
x1 | X coordinate of the first point (i.e. left) of the line. | |
x2 | X coordinate of the second point (i.e. right) of the line. | |
y | Y coordinate of the points of the line. | |
color | The color value of the line to draw (0xRRGGBBAA). |
Definition at line 1111 of file SDL_gfxPrimitives.c.
int hlineColorStore | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | x2, | |||
Sint16 | y, | |||
Uint32 | color | |||
) |
Draw horizontal line without blending;.
Just stores the color value (including the alpha component) without blending. Only the same number of bits of the destination surface are transfered from the input color value.
dst | The surface to draw on. | |
x1 | X coordinate of the first point (i.e. left) of the line. | |
x2 | X coordinate of the second point (i.e. right) of the line. | |
y | Y coordinate of the points of the line. | |
color | The color value of the line to draw. |
Definition at line 950 of file SDL_gfxPrimitives.c.
int hlineRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | x2, | |||
Sint16 | y, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw horizontal line with blending.
dst | The surface to draw on. | |
x1 | X coordinate of the first point (i.e. left) of the line. | |
x2 | X coordinate of the second point (i.e. right) of the line. | |
y | Y coordinate of the points of the line. | |
r | The red value of the line to draw. | |
g | The green value of the line to draw. | |
b | The blue value of the line to draw. | |
a | The alpha value of the line to draw. |
Definition at line 1278 of file SDL_gfxPrimitives.c.
int hlineRGBAStore | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | x2, | |||
Sint16 | y, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw horizontal line without blending.
Just stores the color value (including the alpha component) without blending. Function should only be used for 32 bit target surfaces.
dst | The surface to draw on. | |
x1 | X coordinate of the first point (i.e. left) of the line. | |
x2 | X coordinate of the second point (i.e. right) of the line. | |
y | Y coordinate of the points of the line. | |
r | The red value of the line to draw. | |
g | The green value of the line to draw. | |
b | The blue value of the line to draw. | |
a | The alpha value of the line to draw. |
Definition at line 1092 of file SDL_gfxPrimitives.c.
int lineColor | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | y1, | |||
Sint16 | x2, | |||
Sint16 | y2, | |||
Uint32 | color | |||
) |
Draw line with alpha blending.
dst | The surface to draw on. | |
x1 | X coordinate of the first point of the line. | |
y1 | Y coordinate of the first point of the line. | |
x2 | X coordinate of the second point of the line. | |
y2 | Y coordinate of the second point of the line. | |
color | The color value of the line to draw (0xRRGGBBAA). |
Definition at line 1950 of file SDL_gfxPrimitives.c.
int lineRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | y1, | |||
Sint16 | x2, | |||
Sint16 | y2, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw line with alpha blending.
dst | The surface to draw on. | |
x1 | X coordinate of the first point of the line. | |
y1 | Y coordinate of the first point of the line. | |
x2 | X coordinate of the second point of the line. | |
y2 | Y coordinate of the second point of the line. | |
r | The red value of the line to draw. | |
g | The green value of the line to draw. | |
b | The blue value of the line to draw. | |
a | The alpha value of the line to draw. |
Definition at line 2159 of file SDL_gfxPrimitives.c.
int pieColor | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rad, | |||
Sint16 | start, | |||
Sint16 | end, | |||
Uint32 | color | |||
) |
Draw pie (outline) with alpha blending.
dst | The surface to draw on. | |
x | X coordinate of the center of the pie. | |
y | Y coordinate of the center of the pie. | |
rad | Radius in pixels of the pie. | |
start | Starting radius in degrees of the pie. | |
end | Ending radius in degrees of the pie. | |
color | The color value of the pie to draw (0xRRGGBBAA). |
Definition at line 4284 of file SDL_gfxPrimitives.c.
int pieRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Sint16 | rad, | |||
Sint16 | start, | |||
Sint16 | end, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw pie (outline) with alpha blending.
dst | The surface to draw on. | |
x | X coordinate of the center of the pie. | |
y | Y coordinate of the center of the pie. | |
rad | Radius in pixels of the pie. | |
start | Starting radius in degrees of the pie. | |
end | Ending radius in degrees of the pie. | |
r | The red value of the pie to draw. | |
g | The green value of the pie to draw. | |
b | The blue value of the pie to draw. | |
a | The alpha value of the pie to draw. |
Definition at line 4307 of file SDL_gfxPrimitives.c.
int pixelColor | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Uint32 | color | |||
) |
Pixel draw with blending enabled if a<255.
dst | The surface to draw on. | |
x | X (horizontal) coordinate of the pixel. | |
y | Y (vertical) coordinate of the pixel. | |
color | The color value of the pixel to draw (0xRRGGBBAA). |
Definition at line 449 of file SDL_gfxPrimitives.c.
int pixelColorNolock | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Uint32 | color | |||
) |
Pixel draw with blending enabled if a<255 - no surface locking.
dst | The surface to draw on. | |
x | X (horizontal) coordinate of the pixel. | |
y | Y (vertical) coordinate of the pixel. | |
color | The color value of the pixel to draw (0xRRGGBBAA). |
Definition at line 497 of file SDL_gfxPrimitives.c.
int pixelColorWeight | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Uint32 | color, | |||
Uint32 | weight | |||
) |
Pixel draw with blending enabled and using alpha weight on color.
dst | The surface to draw on. | |
x | The horizontal coordinate of the pixel. | |
y | The vertical position of the pixel. | |
color | The color value of the pixel to draw (0xRRGGBBAA). | |
weight | The weight multiplied into the alpha value of the pixel. |
Definition at line 846 of file SDL_gfxPrimitives.c.
int pixelColorWeightNolock | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Uint32 | color, | |||
Uint32 | weight | |||
) |
Pixel draw with blending enabled and using alpha weight on color - no locking.
dst | The surface to draw on. | |
x | The horizontal coordinate of the pixel. | |
y | The vertical position of the pixel. | |
color | The color value of the pixel to draw (0xRRGGBBAA). | |
weight | The weight multiplied into the alpha value of the pixel. |
Definition at line 874 of file SDL_gfxPrimitives.c.
int pixelRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Pixel draw with blending enabled if a<255.
dst | The surface to draw on. | |
x | X (horizontal) coordinate of the pixel. | |
y | Y (vertical) coordinate of the pixel. | |
r | The red color value of the pixel to draw. | |
g | The green color value of the pixel to draw. | |
b | The blue color value of the pixel to draw. | |
a | The alpha value of the pixel to draw. |
Definition at line 904 of file SDL_gfxPrimitives.c.
int polygonColor | ( | SDL_Surface * | dst, | |
const Sint16 * | vx, | |||
const Sint16 * | vy, | |||
int | n, | |||
Uint32 | color | |||
) |
Draw polygon with alpha blending.
dst | The surface to draw on. | |
vx | Vertex array containing X coordinates of the points of the polygon. | |
vy | Vertex array containing Y coordinates of the points of the polygon. | |
n | Number of points in the vertex array. Minimum number is 3. | |
color | The color value of the polygon to draw (0xRRGGBBAA). |
Definition at line 4569 of file SDL_gfxPrimitives.c.
int polygonRGBA | ( | SDL_Surface * | dst, | |
const Sint16 * | vx, | |||
const Sint16 * | vy, | |||
int | n, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw polygon with alpha blending.
dst | The surface to draw on. | |
vx | Vertex array containing X coordinates of the points of the polygon. | |
vy | Vertex array containing Y coordinates of the points of the polygon. | |
n | Number of points in the vertex array. Minimum number is 3. | |
r | The red value of the polygon to draw. | |
g | The green value of the polygon to draw. | |
b | The blue value of the polygon to draw. | |
a | The alpha value of the polygon to draw. |
Definition at line 4637 of file SDL_gfxPrimitives.c.
int rectangleColor | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | y1, | |||
Sint16 | x2, | |||
Sint16 | y2, | |||
Uint32 | color | |||
) |
Draw rectangle with blending.
dst | The surface to draw on. | |
x1 | X coordinate of the first point (i.e. top right) of the rectangle. | |
y1 | Y coordinate of the first point (i.e. top right) of the rectangle. | |
x2 | X coordinate of the second point (i.e. bottom left) of the rectangle. | |
y2 | Y coordinate of the second point (i.e. bottom left) of the rectangle. | |
color | The color value of the rectangle to draw (0xRRGGBBAA). |
Definition at line 1485 of file SDL_gfxPrimitives.c.
int rectangleRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | y1, | |||
Sint16 | x2, | |||
Sint16 | y2, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw rectangle with blending.
dst | The surface to draw on. | |
x1 | X coordinate of the first point (i.e. top right) of the rectangle. | |
y1 | Y coordinate of the first point (i.e. top right) of the rectangle. | |
x2 | X coordinate of the second point (i.e. bottom left) of the rectangle. | |
y2 | Y coordinate of the second point (i.e. bottom left) of the rectangle. | |
r | The red value of the rectangle to draw. | |
g | The green value of the rectangle to draw. | |
b | The blue value of the rectangle to draw. | |
a | The alpha value of the rectangle to draw. |
Definition at line 1574 of file SDL_gfxPrimitives.c.
int stringColor | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
const char * | s, | |||
Uint32 | color | |||
) |
Draw a string in the currently set font.
The spacing between consequtive characters in the string is the fixed number of pixels of the character width of the current global font.
dst | The surface to draw on. | |
x | X (horizontal) coordinate of the upper left corner of the string. | |
y | Y (vertical) coordinate of the upper left corner of the string. | |
s | The string to draw. | |
color | The color value of the string to draw (0xRRGGBBAA). |
Definition at line 5670 of file SDL_gfxPrimitives.c.
int stringRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y, | |||
const char * | s, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw a string in the currently set font.
dst | The surface to draw on. | |
x | X (horizontal) coordinate of the upper left corner of the string. | |
y | Y (vertical) coordinate of the upper left corner of the string. | |
s | The string to draw. | |
r | The red value of the string to draw. | |
g | The green value of the string to draw. | |
b | The blue value of the string to draw. | |
a | The alpha value of the string to draw. |
Definition at line 5714 of file SDL_gfxPrimitives.c.
int texturedPolygon | ( | SDL_Surface * | dst, | |
const Sint16 * | vx, | |||
const Sint16 * | vy, | |||
int | n, | |||
SDL_Surface * | texture, | |||
int | texture_dx, | |||
int | texture_dy | |||
) |
Draws a polygon filled with the given texture.
This standard version is calling multithreaded versions with NULL cache parameters.
dst | the destination surface, | |
vx | array of x vector components | |
vy | array of x vector components | |
n | the amount of vectors in the vx and vy array | |
texture | the sdl surface to use to fill the polygon | |
texture_dx | the offset of the texture relative to the screeen. if you move the polygon 10 pixels to the left and want the texture to apear the same you need to increase the texture_dx value | |
texture_dy | see texture_dx |
Definition at line 5312 of file SDL_gfxPrimitives.c.
int texturedPolygonMT | ( | SDL_Surface * | dst, | |
const Sint16 * | vx, | |||
const Sint16 * | vy, | |||
int | n, | |||
SDL_Surface * | texture, | |||
int | texture_dx, | |||
int | texture_dy, | |||
int ** | polyInts, | |||
int * | polyAllocated | |||
) |
Draws a polygon filled with the given texture (Multi-Threading Capable).
This operation use internally SDL_BlitSurface for lines of the source texture. It supports alpha drawing.
To get the best performance of this operation you need to make sure the texture and the dst surface have the same format (see http://docs.mandragor.org/files/Common_libs_documentation/SDL/SDL_Documentation_project_en/sdlblitsurface.html). The last two parameters are optional, but required for multithreaded operation. When set to NULL, uses global static temp array.
dst | the destination surface, | |
vx | array of x vector components | |
vy | array of x vector components | |
n | the amount of vectors in the vx and vy array | |
texture | the sdl surface to use to fill the polygon | |
texture_dx | the offset of the texture relative to the screeen. if you move the polygon 10 pixels to the left and want the texture to apear the same you need to increase the texture_dx value | |
texture_dy | see texture_dx | |
polyInts | preallocated temp array storage for vertex sorting (used for multi-threaded operation) | |
polyAllocated | flag indicating oif the temp array was allocated (used for multi-threaded operation) |
Definition at line 5145 of file SDL_gfxPrimitives.c.
int trigonColor | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | y1, | |||
Sint16 | x2, | |||
Sint16 | y2, | |||
Sint16 | x3, | |||
Sint16 | y3, | |||
Uint32 | color | |||
) |
Draw trigon (triangle outline) with alpha blending.
Note: Creates vertex array and uses polygon routine to render.
dst | The surface to draw on. | |
x1 | X coordinate of the first point of the trigon. | |
y1 | Y coordinate of the first point of the trigon. | |
x2 | X coordinate of the second point of the trigon. | |
y2 | Y coordinate of the second point of the trigon. | |
x3 | X coordinate of the third point of the trigon. | |
y3 | Y coordinate of the third point of the trigon. | |
color | The color value of the trigon to draw (0xRRGGBBAA). |
Definition at line 4374 of file SDL_gfxPrimitives.c.
int trigonRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x1, | |||
Sint16 | y1, | |||
Sint16 | x2, | |||
Sint16 | y2, | |||
Sint16 | x3, | |||
Sint16 | y3, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw trigon (triangle outline) with alpha blending.
dst | The surface to draw on. | |
x1 | X coordinate of the first point of the trigon. | |
y1 | Y coordinate of the first point of the trigon. | |
x2 | X coordinate of the second point of the trigon. | |
y2 | Y coordinate of the second point of the trigon. | |
x3 | X coordinate of the third point of the trigon. | |
y3 | Y coordinate of the third point of the trigon. | |
r | The red value of the trigon to draw. | |
g | The green value of the trigon to draw. | |
b | The blue value of the trigon to draw. | |
a | The alpha value of the trigon to draw. |
Definition at line 4406 of file SDL_gfxPrimitives.c.
int vlineColor | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y1, | |||
Sint16 | y2, | |||
Uint32 | color | |||
) |
Draw vertical line with blending.
dst | The surface to draw on. | |
x | X coordinate of the points of the line. | |
y1 | Y coordinate of the first point (i.e. top) of the line. | |
y2 | Y coordinate of the second point (i.e. bottom) of the line. | |
color | The color value of the line to draw (0xRRGGBBAA). |
Definition at line 1297 of file SDL_gfxPrimitives.c.
int vlineRGBA | ( | SDL_Surface * | dst, | |
Sint16 | x, | |||
Sint16 | y1, | |||
Sint16 | y2, | |||
Uint8 | r, | |||
Uint8 | g, | |||
Uint8 | b, | |||
Uint8 | a | |||
) |
Draw vertical line with blending.
dst | The surface to draw on. | |
x | X coordinate of the points of the line. | |
y1 | Y coordinate of the first point (i.e. top) of the line. | |
y2 | Y coordinate of the second point (i.e. bottom) of the line. | |
r | The red value of the line to draw. | |
g | The green value of the line to draw. | |
b | The blue value of the line to draw. | |
a | The alpha value of the line to draw. |
Definition at line 1465 of file SDL_gfxPrimitives.c.