summaryrefslogtreecommitdiffstats
path: root/minuitwrp
diff options
context:
space:
mode:
authorthat <github@that.at>2015-02-15 21:40:59 +0100
committerthat <github@that.at>2015-02-15 22:12:29 +0100
commit9876ac3361c77a28a55e7843d6db1dc781f93d95 (patch)
tree3724fb61e274f0480b383303235648e34dd72b8a /minuitwrp
parentgui: make resources type safe (diff)
downloadandroid_bootable_recovery-9876ac3361c77a28a55e7843d6db1dc781f93d95.tar
android_bootable_recovery-9876ac3361c77a28a55e7843d6db1dc781f93d95.tar.gz
android_bootable_recovery-9876ac3361c77a28a55e7843d6db1dc781f93d95.tar.bz2
android_bootable_recovery-9876ac3361c77a28a55e7843d6db1dc781f93d95.tar.lz
android_bootable_recovery-9876ac3361c77a28a55e7843d6db1dc781f93d95.tar.xz
android_bootable_recovery-9876ac3361c77a28a55e7843d6db1dc781f93d95.tar.zst
android_bootable_recovery-9876ac3361c77a28a55e7843d6db1dc781f93d95.zip
Diffstat (limited to 'minuitwrp')
-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);