libdragon
|
2D Graphics More...
Go to the source code of this file.
Data Structures | |
struct | color_t |
Generic color structure. More... | |
Macros | |
#define | RGBA16(rx, gx, bx, ax) |
Create a color_t from the R,G,B,A components in the RGBA16 range (that is: RGB in 0-31, A in 0-1) | |
#define | RGBA32(rx, gx, bx, ax) |
Create a color_t from the R,G,B,A components in the RGBA32 range (0-255). | |
Functions | |
uint16_t | color_to_packed16 (color_t c) |
Convert a color_t to the 16-bit packed format used by a FMT_RGBA16 surface (RGBA 5551) | |
uint32_t | color_to_packed32 (color_t c) |
Convert a color_t to the 32-bit packed format used by a FMT_RGBA32 surface (RGBA 8888) | |
color_t | color_from_packed16 (uint16_t c) |
Create a color_t from the 16-bit packed format used by a FMT_RGBA16 surface (RGBA 5551) | |
color_t | color_from_packed32 (uint32_t c) |
Create a color_t from the 32-bit packed format used by a FMT_RGBA32 surface (RGBA 8888) | |
uint32_t | graphics_make_color (int r, int g, int b, int a) |
Return a packed 32-bit representation of an RGBA color. | |
uint32_t | graphics_convert_color (color_t color) |
Convert a color structure to a 32-bit representation of an RGBA color. | |
void | graphics_draw_pixel (surface_t *surf, int x, int y, uint32_t color) |
Draw a pixel to a given display context. | |
void | graphics_draw_pixel_trans (surface_t *surf, int x, int y, uint32_t color) |
Draw a pixel to a given display context with alpha support. | |
void | graphics_draw_line (surface_t *surf, int x0, int y0, int x1, int y1, uint32_t color) |
Draw a line to a given display context. | |
void | graphics_draw_line_trans (surface_t *surf, int x0, int y0, int x1, int y1, uint32_t color) |
Draw a line to a given display context with alpha support. | |
void | graphics_draw_box (surface_t *surf, int x, int y, int width, int height, uint32_t color) |
Draw a filled rectangle to a display context. | |
void | graphics_draw_box_trans (surface_t *surf, int x, int y, int width, int height, uint32_t color) |
Draw a filled rectangle to a display context. | |
void | graphics_fill_screen (surface_t *surf, uint32_t c) |
Fill the entire screen with a particular color. | |
void | graphics_set_color (uint32_t forecolor, uint32_t backcolor) |
Set the current forecolor and backcolor for text operations. | |
void | graphics_set_default_font (void) |
Set the font to the default. | |
void | graphics_set_font_sprite (sprite_t *font) |
Set the current font. Should be set before using any of the draw function. | |
void | graphics_draw_character (surface_t *surf, int x, int y, char ch) |
Draw a character to the screen using the built-in font. | |
void | graphics_draw_text (surface_t *surf, int x, int y, const char *const msg) |
Draw a null terminated string to a display context. | |
void | graphics_draw_sprite (surface_t *surf, int x, int y, sprite_t *sprite) |
Draw a sprite to a display context. | |
void | graphics_draw_sprite_stride (surface_t *surf, int x, int y, sprite_t *sprite, int offset) |
Draw a sprite from a spritemap to a display context. | |
void | graphics_draw_sprite_trans (surface_t *surf, int x, int y, sprite_t *sprite) |
Draw a sprite to a display context with alpha transparency. | |
void | graphics_draw_sprite_trans_stride (surface_t *surf, int x, int y, sprite_t *sprite, int offset) |
Draw a sprite from a spritemap to a display context. | |
2D Graphics