Wed Apr 17 01:05:42 PDT 2002
[netwalk.git] / color.e
blob168e3d7afaf15f9e4788bdd829bf65b69337a48f
1 class COLOR
2 creation make
3 feature
4 make(r, g, b : INTEGER) is
5 do
6 pointer := ext_make_color(r, g, b)
7 to_integer := ext_convert_color(r, g, b)
8 to_gfx_integer := r * 256 * 256 * 256 + g * 256 * 256 + b * 256 + 255
9 end
11 free is
13 ext_free_color(pointer)
14 end
16 to_external : POINTER is
18 Result := pointer
19 end
21 to_integer : INTEGER
23 to_gfx_integer : INTEGER
25 pointer : POINTER
27 ext_make_color(r, g, b : INTEGER) : POINTER is
28 external "C"
29 end
31 ext_free_color(p : POINTER) is
32 external "C" alias "free"
33 end
35 ext_convert_color(r, g, b : INTEGER) : INTEGER is
36 external "C"
37 end
38 end