diff options
author | quou <quou@disroot.org> | 2024-07-31 22:10:11 +1000 |
---|---|---|
committer | quou <quou@disroot.org> | 2024-07-31 22:10:11 +1000 |
commit | 78a0ff9e5993b4cd826684b52b79604bf02ece25 (patch) | |
tree | 15fd178b18f7f1ac6f6e7dd92618b8c5c76bbabf | |
parent | 84615bccdc0962ac7ecdac258a8006af7ebe1c9b (diff) |
Reset clip function
-rw-r--r-- | render.c | 7 | ||||
-rw-r--r-- | render.h | 1 |
2 files changed, 8 insertions, 0 deletions
@@ -211,6 +211,13 @@ void ren_clip(Renderer* r, const Rect* c) { r->clip[3] = c->y + c->h; } +void ren_clipr(Renderer* r) { + r->clip[0] = 0; + r->clip[1] = 0; + r->clip[2] = r->vp[0]; + r->clip[3] = r->vp[1]; +} + void ren_point(Renderer* r, Colour c, int x, int y) { if (x < r->clip[0]) return; if (y < r->clip[1]) return; @@ -70,6 +70,7 @@ void ren_clear(Renderer* r); void ren_clearc(Renderer* r, Colour c); void ren_cleard(Renderer* r, int depth); void ren_clip(Renderer* r, const Rect* c); +void ren_clipr(Renderer* r); void ren_point(Renderer* r, Colour c, int x, int y); void ren_rect(Renderer* r, Colour c, const Rect*); void ren_char( |