citro2d
|
Functions | |
bool | C2D_DrawImage (C2D_Image img, const C2D_DrawParams *params, const C2D_ImageTint *tint C2D_OPTIONAL(nullptr)) |
Draws an image using the GPU (variant accepting C2D_DrawParams) More... | |
static bool | C2D_DrawImageAt (C2D_Image img, float x, float y, float depth, const C2D_ImageTint *tint C2D_OPTIONAL(nullptr), float scaleX C2D_OPTIONAL(1.0f), float scaleY C2D_OPTIONAL(1.0f)) |
Draws an image using the GPU (variant accepting position/scaling) More... | |
static bool | C2D_DrawImageAtRotated (C2D_Image img, float x, float y, float depth, float angle, const C2D_ImageTint *tint C2D_OPTIONAL(nullptr), float scaleX C2D_OPTIONAL(1.0f), float scaleY C2D_OPTIONAL(1.0f)) |
Draws an image using the GPU (variant accepting position/scaling/rotation) More... | |
bool | C2D_DrawTriangle (float x0, float y0, u32 clr0, float x1, float y1, u32 clr1, float x2, float y2, u32 clr2, float depth) |
Draws a plain triangle using the GPU. More... | |
bool | C2D_DrawLine (float x0, float y0, u32 clr0, float x1, float y1, u32 clr1, float thickness, float depth) |
Draws a plain line using the GPU. More... | |
bool | C2D_DrawRectangle (float x, float y, float z, float w, float h, u32 clr0, u32 clr1, u32 clr2, u32 clr3) |
Draws a plain rectangle using the GPU. More... | |
static bool | C2D_DrawRectSolid (float x, float y, float z, float w, float h, u32 clr) |
Draws a plain rectangle using the GPU (with a solid color) More... | |
bool | C2D_DrawEllipse (float x, float y, float z, float w, float h, u32 clr0, u32 clr1, u32 clr2, u32 clr3) |
Draws an ellipse using the GPU. More... | |
static bool | C2D_DrawEllipseSolid (float x, float y, float z, float w, float h, u32 clr) |
Draws a ellipse using the GPU (with a solid color) More... | |
static bool | C2D_DrawCircle (float x, float y, float z, float radius, u32 clr0, u32 clr1, u32 clr2, u32 clr3) |
Draws a circle (an ellipse with identical width and height) using the GPU. More... | |
static bool | C2D_DrawCircleSolid (float x, float y, float z, float radius, u32 clr) |
Draws a circle (an ellipse with identical width and height) using the GPU (with a solid color) More... | |
|
inlinestatic |
Draws a circle (an ellipse with identical width and height) using the GPU.
[in] | x | X coordinate of the center of the circle |
[in] | y | Y coordinate of the center of the circle |
[in] | z | Z coordinate (depth value) to draw the ellipse with |
[in] | radius | Radius of the circle |
[in] | clr0 | 32-bit RGBA color of the top-left corner of the ellipse |
[in] | clr1 | 32-bit RGBA color of the top-right corner of the ellipse |
[in] | clr2 | 32-bit RGBA color of the bottom-left corner of the ellipse |
[in] | clr3 | 32-bit RGBA color of the bottom-right corner of the ellipse |
|
inlinestatic |
Draws a circle (an ellipse with identical width and height) using the GPU (with a solid color)
[in] | x | X coordinate of the center of the circle |
[in] | y | Y coordinate of the center of the circle |
[in] | z | Z coordinate (depth value) to draw the ellipse with |
[in] | radius | Radius of the circle |
[in] | clr | 32-bit RGBA color of the ellipse |
bool C2D_DrawEllipse | ( | float | x, |
float | y, | ||
float | z, | ||
float | w, | ||
float | h, | ||
u32 | clr0, | ||
u32 | clr1, | ||
u32 | clr2, | ||
u32 | clr3 | ||
) |
Draws an ellipse using the GPU.
[in] | x | X coordinate of the top-left vertex of the ellipse |
[in] | y | Y coordinate of the top-left vertex of the ellipse |
[in] | z | Z coordinate (depth value) to draw the ellipse with |
[in] | w | Width of the ellipse |
[in] | h | Height of the ellipse |
[in] | clr0 | 32-bit RGBA color of the top-left corner of the ellipse |
[in] | clr1 | 32-bit RGBA color of the top-right corner of the ellipse |
[in] | clr2 | 32-bit RGBA color of the bottom-left corner of the ellipse |
[in] | clr3 | 32-bit RGBA color of the bottom-right corner of the ellipse |
|
inlinestatic |
Draws a ellipse using the GPU (with a solid color)
[in] | x | X coordinate of the top-left vertex of the ellipse |
[in] | y | Y coordinate of the top-left vertex of the ellipse |
[in] | z | Z coordinate (depth value) to draw the ellipse with |
[in] | w | Width of the ellipse |
[in] | h | Height of the ellipse |
[in] | clr | 32-bit RGBA color of the ellipse |
bool C2D_DrawImage | ( | C2D_Image | img, |
const C2D_DrawParams * | params, | ||
const C2D_ImageTint *tint | C2D_OPTIONALnullptr | ||
) |
Draws an image using the GPU (variant accepting C2D_DrawParams)
[in] | img | Handle of the image to draw |
[in] | params | Parameters with which to draw the image |
[in] | tint | Tint parameters to apply to the image (optional, can be null) |
|
inlinestatic |
Draws an image using the GPU (variant accepting position/scaling)
[in] | img | Handle of the image to draw |
[in] | x | X coordinate at which to place the top left corner of the image |
[in] | y | Y coordinate at which to place the top left corner of the image |
[in] | depth | Depth value to draw the image with |
[in] | tint | Tint parameters to apply to the image (optional, can be null) |
[in] | scaleX | Horizontal scaling factor to apply to the image (optional, by default 1.0f); negative values apply a horizontal flip |
[in] | scaleY | Vertical scaling factor to apply to the image (optional, by default 1.0f); negative values apply a vertical flip |
|
inlinestatic |
Draws an image using the GPU (variant accepting position/scaling/rotation)
[in] | img | Handle of the image to draw |
[in] | x | X coordinate at which to place the center of the image |
[in] | y | Y coordinate at which to place the center of the image |
[in] | depth | Depth value to draw the image with |
[in] | angle | Angle (in radians) to rotate the image by, counter-clockwise |
[in] | tint | Tint parameters to apply to the image (optional, can be null) |
[in] | scaleX | Horizontal scaling factor to apply to the image (optional, by default 1.0f); negative values apply a horizontal flip |
[in] | scaleY | Vertical scaling factor to apply to the image (optional, by default 1.0f); negative values apply a vertical flip |
bool C2D_DrawLine | ( | float | x0, |
float | y0, | ||
u32 | clr0, | ||
float | x1, | ||
float | y1, | ||
u32 | clr1, | ||
float | thickness, | ||
float | depth | ||
) |
Draws a plain line using the GPU.
[in] | x0 | X coordinate of the first vertex of the line |
[in] | y0 | Y coordinate of the first vertex of the line |
[in] | clr0 | 32-bit RGBA color of the first vertex of the line |
[in] | x1 | X coordinate of the second vertex of the line |
[in] | y1 | Y coordinate of the second vertex of the line |
[in] | clr1 | 32-bit RGBA color of the second vertex of the line |
[in] | thickness | Thickness, in pixels, of the line |
[in] | depth | Depth value to draw the line with |
bool C2D_DrawRectangle | ( | float | x, |
float | y, | ||
float | z, | ||
float | w, | ||
float | h, | ||
u32 | clr0, | ||
u32 | clr1, | ||
u32 | clr2, | ||
u32 | clr3 | ||
) |
Draws a plain rectangle using the GPU.
[in] | x | X coordinate of the top-left vertex of the rectangle |
[in] | y | Y coordinate of the top-left vertex of the rectangle |
[in] | z | Z coordinate (depth value) to draw the rectangle with |
[in] | w | Width of the rectangle |
[in] | h | Height of the rectangle |
[in] | clr0 | 32-bit RGBA color of the top-left corner of the rectangle |
[in] | clr1 | 32-bit RGBA color of the top-right corner of the rectangle |
[in] | clr2 | 32-bit RGBA color of the bottom-left corner of the rectangle |
[in] | clr3 | 32-bit RGBA color of the bottom-right corner of the rectangle |
|
inlinestatic |
Draws a plain rectangle using the GPU (with a solid color)
[in] | x | X coordinate of the top-left vertex of the rectangle |
[in] | y | Y coordinate of the top-left vertex of the rectangle |
[in] | z | Z coordinate (depth value) to draw the rectangle with |
[in] | w | Width of the rectangle |
[in] | h | Height of the rectangle |
[in] | clr | 32-bit RGBA color of the rectangle |
bool C2D_DrawTriangle | ( | float | x0, |
float | y0, | ||
u32 | clr0, | ||
float | x1, | ||
float | y1, | ||
u32 | clr1, | ||
float | x2, | ||
float | y2, | ||
u32 | clr2, | ||
float | depth | ||
) |
Draws a plain triangle using the GPU.
[in] | x0 | X coordinate of the first vertex of the triangle |
[in] | y0 | Y coordinate of the first vertex of the triangle |
[in] | clr0 | 32-bit RGBA color of the first vertex of the triangle |
[in] | x1 | X coordinate of the second vertex of the triangle |
[in] | y1 | Y coordinate of the second vertex of the triangle |
[in] | clr1 | 32-bit RGBA color of the second vertex of the triangle |
[in] | x2 | X coordinate of the third vertex of the triangle |
[in] | y2 | Y coordinate of the third vertex of the triangle |
[in] | clr2 | 32-bit RGBA color of the third vertex of the triangle |
[in] | depth | Depth value to draw the triangle with |