2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2004-2006 - INRIA - Fabrice Leray
4 * Copyright (C) 2006 - INRIA - Allan Cornet
5 * Copyright (C) 2006 - INRIA - Jean-Baptiste Silvy
6 * Copyright (C) 2009 - DIGITEO - Pierre Lando
8 * This file must be used under the terms of the CeCILL.
9 * This source file is licensed as described in the file COPYING, which
10 * you should have received as part of this distribution. The terms
11 * are also available at
12 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
16 /*------------------------------------------------------------------------*/
17 /* file: set_color_map_property.c */
18 /* desc : function to modify in Scilab the color_map field of */
20 /*------------------------------------------------------------------------*/
22 #include "setHandleProperty.h"
23 #include "SetProperty.h"
24 #include "getPropertyAssignedValue.h"
26 #include "localization.h"
27 #include "SetPropertyStatus.h"
29 /*------------------------------------------------------------------------*/
30 int set_color_map_property( sciPointObj * pobj, size_t stackPointer, int valueType, int nbRow, int nbCol )
32 if ( !isParameterDoubleMatrix( valueType ) )
34 Scierror(999, _("Wrong type for '%s' property: Real matrix expected.\n"), "color_map");
35 return SET_PROPERTY_ERROR ;
38 return sciSetColormap( pobj, getDoubleMatrixFromStack( stackPointer), nbRow, nbCol ) ;
40 /*------------------------------------------------------------------------*/