summaryrefslogtreecommitdiffstats
path: root/minui
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--minuitwrp/graphics.c14
-rw-r--r--minuitwrp/minui.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/minuitwrp/graphics.c b/minuitwrp/graphics.c
index 93123e40a..7160c7e2e 100644
--- a/minuitwrp/graphics.c
+++ b/minuitwrp/graphics.c
@@ -558,6 +558,20 @@ int gr_textExWH(int x, int y, const char *s, void* pFont, int max_width, int max
return x;
}
+void gr_clip(int x, int y, int w, int h)
+{
+ GGLContext *gl = gr_context;
+ gl->scissor(gl, x, y, w, h);
+ gl->enable(gl, GGL_SCISSOR_TEST);
+}
+
+void gr_noclip()
+{
+ GGLContext *gl = gr_context;
+ gl->scissor(gl, 0, 0, gr_fb_width(), gr_fb_height());
+ gl->disable(gl, GGL_SCISSOR_TEST);
+}
+
void gr_fill(int x, int y, int w, int h)
{
GGLContext *gl = gr_context;
diff --git a/minuitwrp/minui.h b/minuitwrp/minui.h
index fff7ddb97..8ef04445c 100644
--- a/minuitwrp/minui.h
+++ b/minuitwrp/minui.h
@@ -36,6 +36,8 @@ void gr_flip(void);
int gr_fb_blank(int blank);
void gr_color(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
+void gr_clip(int x, int y, int w, int h);
+void gr_noclip();
void gr_fill(int x, int y, int w, int h);
int gr_textEx(int x, int y, const char *s, void* font);