23 |
#include <string.h> |
#include <string.h> |
24 |
|
|
25 |
JNIEXPORT void JNICALL |
JNIEXPORT void JNICALL |
26 |
Java_DemoJAWT_paint (JNIEnv* env, jobject canvas, jobject graphics) |
Java_gnu_classpath_examples_jawt_DemoJAWT_paintIt (JNIEnv* env, |
27 |
|
jobject canvas, |
28 |
|
jobject graphics, |
29 |
|
jboolean on) |
30 |
{ |
{ |
31 |
JAWT awt; |
JAWT awt; |
32 |
JAWT_DrawingSurface* surface; |
JAWT_DrawingSurface* surface; |
127 |
|
|
128 |
for (c = 5; c >= 0; c--) |
for (c = 5; c >= 0; c--) |
129 |
{ |
{ |
130 |
if (c % 2) |
if (c % 2 == on) |
131 |
XSetForeground (display, gc, yellow.pixel); |
XSetForeground (display, gc, yellow.pixel); |
132 |
else |
else |
133 |
XSetForeground (display, gc, orange.pixel); |
XSetForeground (display, gc, orange.pixel); |