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
7 * Copyright (C) 2010 - DIGITEO - Manuel Juliachs
9 * This file must be used under the terms of the CeCILL.
10 * This source file is licensed as described in the file COPYING, which
11 * you should have received as part of this distribution. The terms
12 * are also available at
13 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
17 /*------------------------------------------------------------------------*/
18 /* file: set_color_map_property.c */
19 /* desc : function to modify in Scilab the color_map field of */
21 /*------------------------------------------------------------------------*/
23 #include "setHandleProperty.h"
24 #include "SetProperty.h"
25 #include "getPropertyAssignedValue.h"
27 #include "localization.h"
28 #include "SetPropertyStatus.h"
30 #include "setGraphicObjectProperty.h"
31 #include "graphicObjectProperties.h"
33 /*------------------------------------------------------------------------*/
34 int set_color_map_property(void* _pvCtx, char* pobjUID, size_t stackPointer, int valueType, int nbRow, int nbCol )
38 if ( !( valueType == sci_matrix ) )
40 Scierror(999, _("Wrong type for '%s' property: Real matrix expected.\n"), "color_map");
41 return SET_PROPERTY_ERROR ;
44 status = setGraphicObjectProperty(pobjUID, __GO_COLORMAP__, stk(stackPointer), jni_double_vector, nbRow * nbCol);
48 return SET_PROPERTY_SUCCEED;
52 Scierror(999, _("'%s' property does not exist for this handle.\n"), "color_map");
53 return SET_PROPERTY_ERROR;
56 /*------------------------------------------------------------------------*/