diff options
Diffstat (limited to 'teensy/teensy.h')
| -rw-r--r-- | teensy/teensy.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/teensy/teensy.h b/teensy/teensy.h index 1a738d7..300939c 100644 --- a/teensy/teensy.h +++ b/teensy/teensy.h @@ -23,6 +23,8 @@ #define ty_max(a, b) ((a) > (b) ? (a) : (b)) #define ty_min(a, b) ((a) < (b) ? (a) : (b)) +#define TY_CLIP_NONE ((ty_Recti){0}) + #define TY_COLOR_BLACK ty_color(0, 0, 0 ) #define TY_COLOR_RED ty_color(255, 0, 0 ) #define TY_COLOR_GREEN ty_color(0, 255, 0 ) @@ -178,6 +180,9 @@ int ty_font_height(const ty_Font *font); // Sets the image that the renderer draws to. Pass NULL to restore the screen. void ty_draw_set_target(const ty_Image *img); +// Prevents anything from being drawn outside of the passed rect. Pass +// TY_CLIP_NONE to reset the clipspace. +void ty_draw_set_clip(ty_Recti clip); // Sets the entire render target to one color. void ty_draw_clear(ty_Color col); // Draws an image at the specified position. The color #FF00FF will be ignored |
