|
pico-sdl
|
Draw primitives, play sounds, etc. More...
Functions | |
| void | pico_output_clear (void) |
| Clears screen with color set by pico_set_color_clear. | |
| void | pico_output_draw_buffer (Pico_Pos pos, const Pico_Color buffer[], Pico_Dim size) |
| Draws an RGBA image that is managed by the user. | |
| void | pico_output_draw_image (Pico_Pos pos, const char *path) |
| Draws an image. | |
| void | pico_output_draw_image_ext (Pico_Pos pos, const char *path, Pico_Dim size) |
| Draws an image with the specified size. | |
| void | pico_output_draw_line (Pico_Pos p1, Pico_Pos p2) |
| Draws a line. | |
| void | pico_output_draw_pixel (Pico_Pos pos) |
| Draws a single pixel. | |
| void | pico_output_draw_pixels (const Pico_Pos *apos, int count) |
| Draws a batch of pixels. | |
| void | pico_output_draw_rect (Pico_Rect rect) |
| Draws a rectangle. | |
| void | pico_output_draw_tri (Pico_Rect rect) |
| Draws a triangle with a right angle at bottom-left. | |
| void | pico_output_draw_oval (Pico_Rect rect) |
| Draws an ellipse. | |
| void | pico_output_draw_poly (const Pico_Pos *apos, int count) |
| Draws a polygon. | |
| void | pico_output_draw_text (Pico_Pos pos, const char *text) |
| Draws text. | |
| void | pico_output_draw_text_ext (Pico_Pos pos, const char *text, Pico_Dim size) |
| Draws text with the specified size. | |
| void | pico_output_draw_fmt (Pico_Pos pos, const char *fmt,...) |
| void | pico_output_draw_fmt_ext (Pico_Pos pos, Pico_Dim size, const char *fmt,...) |
| void | pico_output_present (void) |
| Shows what has been drawn onto the screen. Only does anything on expert mode. | |
| const char * | pico_output_screenshot (const char *path) |
| Takes a screenshot. | |
| const char * | pico_output_screenshot_ext (const char *path, Pico_Rect r) |
| Takes a screenshot from a specific portion of the screen. | |
| void | pico_output_sound (const char *path) |
| Plays a sound. | |
| void | pico_output_write (const char *text) |
| Draws text with an internal cursor as reference, like in text editors. The cursor position updates to (x + len_text * FNT_SIZE, y). | |
| void | pico_output_writeln (const char *text) |
| Draws a line of text with an internal cursor as reference, like in text editors. The cursor position updates to (x, y + FNT_SIZE). | |
Draw primitives, play sounds, etc.
| void pico_output_clear | ( | void | ) |
Clears screen with color set by pico_set_color_clear.
| void pico_output_draw_buffer | ( | Pico_Pos | pos, |
| const Pico_Color | buffer[], | ||
| Pico_Dim | size ) |
Draws an RGBA image that is managed by the user.
| pos | drawing coordinate |
| buffer | the RGBA image |
| size | image size |
| void pico_output_draw_fmt | ( | Pico_Pos | pos, |
| const char * | fmt, | ||
| ... ) |
| void pico_output_draw_image | ( | Pico_Pos | pos, |
| const char * | path ) |
Draws an image.
| pos | drawing coordinate |
| path | path to the image file |
Draws an image with the specified size.
| pos | drawing coordinate |
| path | path to the image file |
| size | image size |
Draws a line.
| p1 | first point |
| p2 | second point |
| void pico_output_draw_oval | ( | Pico_Rect | rect | ) |
Draws an ellipse.
| rect | bounds of the ellipse |
| void pico_output_draw_pixel | ( | Pico_Pos | pos | ) |
Draws a single pixel.
| pos | drawing coordinate |
| void pico_output_draw_pixels | ( | const Pico_Pos * | apos, |
| int | count ) |
Draws a batch of pixels.
| apos | array of coordinates |
| count | amount of coordinates |
| void pico_output_draw_poly | ( | const Pico_Pos * | apos, |
| int | count ) |
Draws a polygon.
| apos | array of coordinates |
| count | amount of coordinates |
| void pico_output_draw_rect | ( | Pico_Rect | rect | ) |
Draws a rectangle.
| rect | rectangle to draw |
| void pico_output_draw_text | ( | Pico_Pos | pos, |
| const char * | text ) |
Draws text with the specified size.
| pos | drawing coordinate |
| text | text to draw |
| size | text size |
| void pico_output_draw_tri | ( | Pico_Rect | rect | ) |
Draws a triangle with a right angle at bottom-left.
| rect | bounds of the triangle |
| void pico_output_present | ( | void | ) |
Shows what has been drawn onto the screen. Only does anything on expert mode.
| const char * pico_output_screenshot | ( | const char * | path | ) |
Takes a screenshot.
| path | screenshot filepath (NULL uses timestamp in the name) |
| const char * pico_output_screenshot_ext | ( | const char * | path, |
| Pico_Rect | r ) |
Takes a screenshot from a specific portion of the screen.
| path | screenshot filepath (NULL uses timestamp in the name) |
| r | region to screenshot, in logical coordinates |
| void pico_output_sound | ( | const char * | path | ) |
Plays a sound.
| path | path to the audio file |
| void pico_output_write | ( | const char * | text | ) |
Draws text with an internal cursor as reference, like in text editors. The cursor position updates to (x + len_text * FNT_SIZE, y).
| text | text to draw |
| void pico_output_writeln | ( | const char * | text | ) |
Draws a line of text with an internal cursor as reference, like in text editors. The cursor position updates to (x, y + FNT_SIZE).
| text | text to draw |