1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // This file must be used under the terms of the CeCILL.
4 // This source file is licensed as described in the file COPYING, which
5 // you should have received as part of this distribution. The terms
6 // are also available at
7 // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9 function colordef(a1,a2)
10 if type(a1)==9 then //a handle
12 if f.type<>'Figure' then
13 error('First argument shoud be a handle on a figure'),
16 n=winsid();if n==[] then n=0;else n=max(n+1),end
23 if type(a1)<>10 then error(44,1), end
27 f.color_map=[jetcolormap(64);[1 1 1]*0.8];
28 f.background=65;f.foreground=-1;
29 a.background=-2;a.foreground=-1;
30 a.font_color=a.foreground;
31 a.mark_foreground=a.foreground;
33 if MSDOS then c=0.2, else c=0.35,end
34 f.color_map=[jetcolormap(64);[1 1 1]*c];
35 f.background=65;f.foreground=-2;
36 a.background=-1;a.foreground=-2;
37 a.font_color=a.foreground;
38 a.mark_foreground=a.foreground;
40 f.color_map=[hsvcolormap(64)];
41 f.background=-1;f.foreground=-2;
42 a.background=-1;a.foreground=-2;
43 a.font_color=a.foreground;
44 a.mark_foreground=a.foreground;
46 error('Unknown color default option '+a1)