From: xwt Date: Fri, 30 Jan 2004 07:40:24 +0000 (+0000) Subject: 2003/10/28 23:58:58 X-Git-Tag: RC3~409 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=a73b47cb5d3c5e3b9db5ca53147c4b57d9f55b07;p=org.ibex.core.git 2003/10/28 23:58:58 darcs-hash:20040130074024-3ac31-2c9f37fc81552c390e3b895d0e0cb47c4d9000aa.gz --- diff --git a/src/org/xwt/plat/OpenGL.cc b/src/org/xwt/plat/OpenGL.cc index 12c6c81..3c8cf6a 100644 --- a/src/org/xwt/plat/OpenGL.cc +++ b/src/org/xwt/plat/OpenGL.cc @@ -25,7 +25,8 @@ #include -#define min(a,b) (a(b)?(a):(b)) namespace org { namespace xwt { namespace plat { @@ -179,6 +180,8 @@ void OpenGL$RectGLPicture::natInit(Object *data_, jboolean alphaOnly) { } void OpenGL$RectGLPicture::draw(jint dx, jint dy, jint cx1, jint cy1, jint cx2, jint cy2) { + cx1 = max(dx, cx1); + cy1 = max(dy, cy1); cx2 = min(cx2, dx + width); cy2 = min(cy2, dy + height); if (cy2 <= cy1 || cx2 <= cx1) return; @@ -273,6 +276,8 @@ void OpenGL$SquareGLPicture::natInit(Object *data_, jboolean alphaOnly) { } void OpenGL$SquareGLPicture::draw(jint dx, jint dy, jint cx1, jint cy1, jint cx2, jint cy2) { + cx1 = max(dx, cx1); + cy1 = max(dy, cy1); cx2 = min(cx2, dx + width); cy2 = min(cy2, dy + height); if (cy2 <= cy1 || cx2 <= cx1) return;