From 9876ac3361c77a28a55e7843d6db1dc781f93d95 Mon Sep 17 00:00:00 2001 From: that Date: Sun, 15 Feb 2015 21:40:59 +0100 Subject: gui: support scrollable lists without headers If the
element doesn't exist, the header is not drawn. - minuitwrp: add function for clipping all drawing to a rectangle ...and another one to cancel it. Change-Id: If0f688a5debee6ebd9c457999fe571705a42c5cc --- minuitwrp/graphics.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'minuitwrp/graphics.c') 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; -- cgit v1.2.3