From bc5203f5a2e88aa6dd9f3ed54496d9813dfbc84e Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Thu, 21 May 2026 20:51:58 -0400 Subject: allow size 0 clips --- teensy/teensy.h | 2 +- teensy/teensy_renderer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'teensy') diff --git a/teensy/teensy.h b/teensy/teensy.h index 300939c..e5954fc 100644 --- a/teensy/teensy.h +++ b/teensy/teensy.h @@ -23,7 +23,7 @@ #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_CLIP_NONE (ty_recti(0, 0, -1, -1)) #define TY_COLOR_BLACK ty_color(0, 0, 0 ) #define TY_COLOR_RED ty_color(255, 0, 0 ) diff --git a/teensy/teensy_renderer.c b/teensy/teensy_renderer.c index eee67a3..5f6fced 100644 --- a/teensy/teensy_renderer.c +++ b/teensy/teensy_renderer.c @@ -148,7 +148,7 @@ void ty_draw_set_target(const ty_Image *img) void ty_draw_set_clip(ty_Recti clip) { - if (clip.w <= 0 || clip.h <= 0) + if (clip.w < 0 || clip.h < 0) clip = screenspace(); ty_Vec2i start = clamp_point(ty_recti_start(clip), screenspace()); -- cgit v1.3-2-g0d8e