projects
/
org.ibex.core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
18b612c
)
2003/10/28 23:58:58
author
xwt
<xwt@xwt.org>
Fri, 30 Jan 2004 07:40:24 +0000
(07:40 +0000)
committer
xwt
<xwt@xwt.org>
Fri, 30 Jan 2004 07:40:24 +0000
(07:40 +0000)
darcs-hash:
20040130074024
-3ac31-
2c9f37fc81552c390e3b895d0e0cb47c4d9000aa
.gz
src/org/xwt/plat/OpenGL.cc
patch
|
blob
|
history
diff --git
a/src/org/xwt/plat/OpenGL.cc
b/src/org/xwt/plat/OpenGL.cc
index
12c6c81
..
3c8cf6a
100644
(file)
--- a/
src/org/xwt/plat/OpenGL.cc
+++ b/
src/org/xwt/plat/OpenGL.cc
@@
-25,7
+25,8
@@
#include <stdio.h>
#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 {
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) {
}
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;
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) {
}
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;
cx2 = min(cx2, dx + width);
cy2 = min(cy2, dy + height);
if (cy2 <= cy1 || cx2 <= cx1) return;