* Setting the "foreground" property for a figure was possible even if not officially
supported or documented. This now returns an error.
Please use the axes "foreground" property instead. See bug #11369.
Change-Id: I1f8c89650c28135dd0f7b5f9ff598db58a3a9734
* Bug #11349 fixed - There was an error when path to external editor contained
white spaces.
+* Bug #11369 fixed - colordef("black") returned an error about an unknown property.
+
* Bug #11385 fixed - length() returned a wrong error message when called without
input argument.
as second (up to last) input argument. In these cases, only the first string of
the vector was taken into account. These calls now return an error. See bug #11398.
+* Setting the "foreground" property for a figure was possible even if not officially
+ supported or documented. This now returns an error.
+ Please use the axes "foreground" property instead. See bug #11369.
Changes between version 5.4.0-alpha-1 and 5.4.0-beta-1 of Scilab
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution. The terms
-// are also available at
+// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
function colordef(varargin)
if type(a1)==9 then //First argument is an handle
f=a1;
a1=a2;
- if f.type<>'Figure' then
+ if f.type<>'Figure' then
error(msprintf(gettext("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"), "colordef", 1,"handle on a figure, ""new"""));
end
scf(f);
select convstr(a1)
case 'white'
f.color_map=[jetcolormap(64);[1 1 1]*0.8];
- f.background=65;f.foreground=-1;
+ f.background=65;
a.background=-2;a.foreground=-1;
a.font_color=a.foreground;
a.mark_foreground=a.foreground;
case 'black'
if getos() == 'Windows' then c=0.2, else c=0.35,end
f.color_map=[jetcolormap(64);[1 1 1]*c];
- f.background=65;f.foreground=-2;
+ f.background=65;
a.background=-1;a.foreground=-2;
a.font_color=a.foreground;
a.mark_foreground=a.foreground;
case 'none'
f.color_map=[hsvcolormap(64)];
- f.background=-1;f.foreground=-2;
+ f.background=-1;
a.background=-1;a.foreground=-2;
a.font_color=a.foreground;
a.mark_foreground=a.foreground;
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - Scilab Enterprises - Vincent COUVERT
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- TEST WITH GRAPHIC -->
+// <-- Non-regression test for bug 11349 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=11349
+//
+// <-- Short Description -->
+// colordef("black") returned an error about an unknown property.
+assert_checktrue(execstr("colordef(""black"")", "errcatch") == 0);
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - Scilab Enterprises - Vincent COUVERT
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- TEST WITH GRAPHIC -->
+
+// <-- Non-regression test for bug 11349 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=11349
+//
+// <-- Short Description -->
+// colordef("black") returned an error about an unknown property.
+
+assert_checktrue(execstr("colordef(""black"")", "errcatch") == 0);
\ No newline at end of file