
Go to the source code of this file.
Macros | |
| #define | CHECK_RENDERER(ret) |
Functions | |
| float | GPU_SetLineThickness (float thickness) |
| float | GPU_GetLineThickness (void) |
| void | GPU_Pixel (GPU_Target *target, float x, float y, SDL_Color color) |
| void | GPU_Line (GPU_Target *target, float x1, float y1, float x2, float y2, SDL_Color color) |
| void | GPU_Arc (GPU_Target *target, float x, float y, float radius, float start_angle, float end_angle, SDL_Color color) |
| void | GPU_ArcFilled (GPU_Target *target, float x, float y, float radius, float start_angle, float end_angle, SDL_Color color) |
| void | GPU_Circle (GPU_Target *target, float x, float y, float radius, SDL_Color color) |
| void | GPU_CircleFilled (GPU_Target *target, float x, float y, float radius, SDL_Color color) |
| void | GPU_Sector (GPU_Target *target, float x, float y, float inner_radius, float outer_radius, float start_angle, float end_angle, SDL_Color color) |
| void | GPU_SectorFilled (GPU_Target *target, float x, float y, float inner_radius, float outer_radius, float start_angle, float end_angle, SDL_Color color) |
| void | GPU_Tri (GPU_Target *target, float x1, float y1, float x2, float y2, float x3, float y3, SDL_Color color) |
| void | GPU_TriFilled (GPU_Target *target, float x1, float y1, float x2, float y2, float x3, float y3, SDL_Color color) |
| void | GPU_Rectangle (GPU_Target *target, float x1, float y1, float x2, float y2, SDL_Color color) |
| void | GPU_RectangleFilled (GPU_Target *target, float x1, float y1, float x2, float y2, SDL_Color color) |
| void | GPU_RectangleRound (GPU_Target *target, float x1, float y1, float x2, float y2, float radius, SDL_Color color) |
| void | GPU_RectangleRoundFilled (GPU_Target *target, float x1, float y1, float x2, float y2, float radius, SDL_Color color) |
| void | GPU_Polygon (GPU_Target *target, unsigned int num_vertices, float *vertices, SDL_Color color) |
| void | GPU_PolygonFilled (GPU_Target *target, unsigned int num_vertices, float *vertices, SDL_Color color) |
| #define CHECK_RENDERER | ( | ret | ) |
Definition at line 4 of file SDL_gpuShapes.c.
Referenced by GPU_Arc(), GPU_ArcFilled(), GPU_Circle(), GPU_CircleFilled(), GPU_GetLineThickness(), GPU_Line(), GPU_Pixel(), GPU_Polygon(), GPU_PolygonFilled(), GPU_Rectangle(), GPU_RectangleFilled(), GPU_RectangleRound(), GPU_RectangleRoundFilled(), GPU_Sector(), GPU_SectorFilled(), GPU_SetLineThickness(), GPU_Tri(), and GPU_TriFilled().
| void GPU_Arc | ( | GPU_Target * | target, |
| float | x, | ||
| float | y, | ||
| float | radius, | ||
| float | start_angle, | ||
| float | end_angle, | ||
| SDL_Color | color | ||
| ) |
Renders a colored arc curve (circle segment).
| target | The destination render target |
| x | x-coord of center point |
| y | y-coord of center point |
| radius | The radius of the circle / distance from the center point that rendering will occur |
| start_angle | The angle to start from, in degrees. Measured clockwise from the positive x-axis. |
| end_angle | The angle to end at, in degrees. Measured clockwise from the positive x-axis. |
| color | The color of the shape to render |
Definition at line 47 of file SDL_gpuShapes.c.
References CHECK_RENDERER.
| void GPU_ArcFilled | ( | GPU_Target * | target, |
| float | x, | ||
| float | y, | ||
| float | radius, | ||
| float | start_angle, | ||
| float | end_angle, | ||
| SDL_Color | color | ||
| ) |
Renders a colored filled arc (circle segment / pie piece).
| target | The destination render target |
| x | x-coord of center point |
| y | y-coord of center point |
| radius | The radius of the circle / distance from the center point that rendering will occur |
| start_angle | The angle to start from, in degrees. Measured clockwise from the positive x-axis. |
| end_angle | The angle to end at, in degrees. Measured clockwise from the positive x-axis. |
| color | The color of the shape to render |
Definition at line 57 of file SDL_gpuShapes.c.
References CHECK_RENDERER.
| void GPU_Circle | ( | GPU_Target * | target, |
| float | x, | ||
| float | y, | ||
| float | radius, | ||
| SDL_Color | color | ||
| ) |
Renders a colored circle outline.
| target | The destination render target |
| x | x-coord of center point |
| y | y-coord of center point |
| radius | The radius of the circle / distance from the center point that rendering will occur |
| color | The color of the shape to render |
Definition at line 66 of file SDL_gpuShapes.c.
References CHECK_RENDERER.
| void GPU_CircleFilled | ( | GPU_Target * | target, |
| float | x, | ||
| float | y, | ||
| float | radius, | ||
| SDL_Color | color | ||
| ) |
Renders a colored filled circle.
| target | The destination render target |
| x | x-coord of center point |
| y | y-coord of center point |
| radius | The radius of the circle / distance from the center point that rendering will occur |
| color | The color of the shape to render |
Definition at line 75 of file SDL_gpuShapes.c.
References CHECK_RENDERER.
| float GPU_GetLineThickness | ( | void | ) |
Returns the current line thickness value.
Definition at line 19 of file SDL_gpuShapes.c.
References CHECK_RENDERER.
| void GPU_Line | ( | GPU_Target * | target, |
| float | x1, | ||
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| SDL_Color | color | ||
| ) |
Renders a colored line.
| target | The destination render target |
| x1 | x-coord of starting point |
| y1 | y-coord of starting point |
| x2 | x-coord of ending point |
| y2 | y-coord of ending point |
| color | The color of the shape to render |
Definition at line 37 of file SDL_gpuShapes.c.
References CHECK_RENDERER.
| void GPU_Pixel | ( | GPU_Target * | target, |
| float | x, | ||
| float | y, | ||
| SDL_Color | color | ||
| ) |
Renders a colored point.
| target | The destination render target |
| x | x-coord of the point |
| y | y-coord of the point |
| color | The color of the shape to render |
Definition at line 28 of file SDL_gpuShapes.c.
References CHECK_RENDERER.
| void GPU_Polygon | ( | GPU_Target * | target, |
| unsigned int | num_vertices, | ||
| float * | vertices, | ||
| SDL_Color | color | ||
| ) |
Renders a colored polygon outline. The vertices are expected to define a convex polygon.
| target | The destination render target |
| num_vertices | Number of vertices (x and y pairs) |
| vertices | An array of vertex positions stored as interlaced x and y coords, e.g. {x1, y1, x2, y2, ...} |
| color | The color of the shape to render |
Definition at line 156 of file SDL_gpuShapes.c.
References CHECK_RENDERER.
| void GPU_PolygonFilled | ( | GPU_Target * | target, |
| unsigned int | num_vertices, | ||
| float * | vertices, | ||
| SDL_Color | color | ||
| ) |
Renders a colored filled polygon. The vertices are expected to define a convex polygon.
| target | The destination render target |
| num_vertices | Number of vertices (x and y pairs) |
| vertices | An array of vertex positions stored as interlaced x and y coords, e.g. {x1, y1, x2, y2, ...} |
| color | The color of the shape to render |
Definition at line 165 of file SDL_gpuShapes.c.
References CHECK_RENDERER.
| void GPU_Rectangle | ( | GPU_Target * | target, |
| float | x1, | ||
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| SDL_Color | color | ||
| ) |
Renders a colored rectangle outline.
| target | The destination render target |
| x1 | x-coord of top-left corner |
| y1 | y-coord of top-left corner |
| x2 | x-coord of bottom-right corner |
| y2 | y-coord of bottom-right corner |
| color | The color of the shape to render |
Definition at line 120 of file SDL_gpuShapes.c.
References CHECK_RENDERER.
| void GPU_RectangleFilled | ( | GPU_Target * | target, |
| float | x1, | ||
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| SDL_Color | color | ||
| ) |
Renders a colored filled rectangle.
| target | The destination render target |
| x1 | x-coord of top-left corner |
| y1 | y-coord of top-left corner |
| x2 | x-coord of bottom-right corner |
| y2 | y-coord of bottom-right corner |
| color | The color of the shape to render |
Definition at line 129 of file SDL_gpuShapes.c.
References CHECK_RENDERER.
| void GPU_RectangleRound | ( | GPU_Target * | target, |
| float | x1, | ||
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| float | radius, | ||
| SDL_Color | color | ||
| ) |
Renders a colored rounded (filleted) rectangle outline.
| target | The destination render target |
| x1 | x-coord of top-left corner |
| y1 | y-coord of top-left corner |
| x2 | x-coord of bottom-right corner |
| y2 | y-coord of bottom-right corner |
| radius | The radius of the corners |
| color | The color of the shape to render |
Definition at line 138 of file SDL_gpuShapes.c.
References CHECK_RENDERER.
| void GPU_RectangleRoundFilled | ( | GPU_Target * | target, |
| float | x1, | ||
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| float | radius, | ||
| SDL_Color | color | ||
| ) |
Renders a colored filled rounded (filleted) rectangle.
| target | The destination render target |
| x1 | x-coord of top-left corner |
| y1 | y-coord of top-left corner |
| x2 | x-coord of bottom-right corner |
| y2 | y-coord of bottom-right corner |
| radius | The radius of the corners |
| color | The color of the shape to render |
Definition at line 147 of file SDL_gpuShapes.c.
References CHECK_RENDERER.
| void GPU_Sector | ( | GPU_Target * | target, |
| float | x, | ||
| float | y, | ||
| float | inner_radius, | ||
| float | outer_radius, | ||
| float | start_angle, | ||
| float | end_angle, | ||
| SDL_Color | color | ||
| ) |
Renders a colored annular sector outline (ring segment).
| target | The destination render target |
| x | x-coord of center point |
| y | y-coord of center point |
| inner_radius | The inner radius of the ring |
| outer_radius | The outer radius of the ring |
| start_angle | The angle to start from, in degrees. Measured clockwise from the positive x-axis. |
| end_angle | The angle to end at, in degrees. Measured clockwise from the positive x-axis. |
| color | The color of the shape to render |
Definition at line 84 of file SDL_gpuShapes.c.
References CHECK_RENDERER.
| void GPU_SectorFilled | ( | GPU_Target * | target, |
| float | x, | ||
| float | y, | ||
| float | inner_radius, | ||
| float | outer_radius, | ||
| float | start_angle, | ||
| float | end_angle, | ||
| SDL_Color | color | ||
| ) |
Renders a colored filled annular sector (ring segment).
| target | The destination render target |
| x | x-coord of center point |
| y | y-coord of center point |
| inner_radius | The inner radius of the ring |
| outer_radius | The outer radius of the ring |
| start_angle | The angle to start from, in degrees. Measured clockwise from the positive x-axis. |
| end_angle | The angle to end at, in degrees. Measured clockwise from the positive x-axis. |
| color | The color of the shape to render |
Definition at line 93 of file SDL_gpuShapes.c.
References CHECK_RENDERER.
| float GPU_SetLineThickness | ( | float | thickness | ) |
Sets the thickness of lines for the current context.
| thickness | New line thickness in pixels measured across the line. Default is 1.0f. |
Definition at line 10 of file SDL_gpuShapes.c.
References CHECK_RENDERER.
| void GPU_Tri | ( | GPU_Target * | target, |
| float | x1, | ||
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| float | x3, | ||
| float | y3, | ||
| SDL_Color | color | ||
| ) |
Renders a colored triangle outline.
| target | The destination render target |
| x1 | x-coord of first point |
| y1 | y-coord of first point |
| x2 | x-coord of second point |
| y2 | y-coord of second point |
| x3 | x-coord of third point |
| y3 | y-coord of third point |
| color | The color of the shape to render |
Definition at line 102 of file SDL_gpuShapes.c.
References CHECK_RENDERER.
| void GPU_TriFilled | ( | GPU_Target * | target, |
| float | x1, | ||
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| float | x3, | ||
| float | y3, | ||
| SDL_Color | color | ||
| ) |
Renders a colored filled triangle.
| target | The destination render target |
| x1 | x-coord of first point |
| y1 | y-coord of first point |
| x2 | x-coord of second point |
| y2 | y-coord of second point |
| x3 | x-coord of third point |
| y3 | y-coord of third point |
| color | The color of the shape to render |
Definition at line 111 of file SDL_gpuShapes.c.
References CHECK_RENDERER.
1.8.8