aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-10-01 19:29:54 +1000
committerquou <quou@disroot.org>2024-10-01 19:29:54 +1000
commit0d9943b35af06ca3f33e658294b6be623edd8242 (patch)
tree20311ed49d1dfad2afdd178961a9a85a3a7698cb
parent48721756517c3bcac5522740fb76d405a9b31f09 (diff)
ren_rclip
-rw-r--r--render.c7
-rw-r--r--render.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/render.c b/render.c
index 147b946..9a504a0 100644
--- a/render.c
+++ b/render.c
@@ -38,6 +38,13 @@ void ren_clip(Renderer* r, const Rect* re) {
r->clip[3] = re->y + re->h;
}
+void ren_rclip(Renderer* r) {
+ r->clip[0] = 0;
+ r->clip[1] = 0;
+ r->clip[2] = r->w;
+ r->clip[3] = r->h;
+}
+
void ren_clear(Renderer* r) {
int i, j;
for (j = r->clip[1]; j < r->clip[3]; j++)
diff --git a/render.h b/render.h
index 1bf4572..98a8cc7 100644
--- a/render.h
+++ b/render.h
@@ -16,6 +16,7 @@ typedef struct Renderer {
void ren_begin(Renderer* r, unsigned* t, int w, int h);
void ren_end(Renderer* r);
void ren_clip(Renderer* r, const struct Rect* re);
+void ren_rclip(Renderer* r);
void ren_clear(Renderer* r);
void ren_char(Renderer* r, int x, int y, char ch);
void ren_text(Renderer* r, int x, int y, const char* t);