[prev in list] [next in list] [prev in thread] [next in thread]
List: xwt-cvs
Subject: [cvs] commit: 28-Oct xwt OpenGL.cc: none
From: xwt () megacz ! com
Date: 2003-10-28 23:58:58
[Download RAW message or body]
28-Oct xwt OpenGL.cc: none
==============================================================================
--- OpenGL.cc 2003/10/28 23:55:30 1.14
+++ OpenGL.cc 2003/10/28 23:57:58
@@ -25,7 +25,8 @@
#include <stdio.h>
-#define min(a,b) (a<b?a:b)
+#define min(a,b) ((a)<(b)?(a):(b))
+#define max(a,b) ((a)>(b)?(a):(b))
namespace org { namespace xwt { namespace plat {
@@ -179,6 +180,8 @@
}
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::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;
_______________________________________________
cvs mailing list
cvs@lists.xwt.org
http://lists.xwt.org/listinfo/cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic