aboutsummaryrefslogtreecommitdiff
path: root/Examples/GIFPlot/Java/README
blob: 30058e52b9adf50cf62317decae55008367aac06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
The gifplot example does not work straight out of the box, 
I had to change ../Interface/gifplot.i slightly for java.

a)
The colors (e.g. BLACK) where defined as:

	#define BLACK 0

and the functions expect 'Pixel color' where Pixel is a unsigned char.
#define constants contain no type information and are translated to integer
constants. Because of that, you have to cast every Pixel to a byte in java.

Changing the definition to:
	const Pixel BLACK = 0;
fixes this.

b)
The definitions:

const PixMap *SQUARE = &PixMap_SQUARE;
const PixMap *TRIANGLE = &PixMap_TRIANGLE;
const PixMap *CROSS = &PixMap_CROSS;

don't work.
The wrapper code expects actual variables SQUARE, etc. and they are not
defined in gifplot.h.

c)
In shadow mode the method ColorMap::default() clashes with the reserved name
default.