include added
[scilab.git] / scilab / modules / graphics / src / c / getHandleProperty / set_color_map_property.c
1 /*------------------------------------------------------------------------*/
2 /* file: set_color_map_property.c                                         */
3 /* Copyright INRIA 2006                                                   */
4 /* Authors : Fabrice Leray, Allan Cornet, Jean-Baptiste Silvy             */
5 /* desc : function to modify in Scilab the color_map field of             */
6 /*        a handle                                                        */
7 /*------------------------------------------------------------------------*/
8
9 #include "setHandleProperty.h"
10 #include "SetProperty.h"
11 #include "getPropertyAssignedValue.h"
12 #include "sciprint.h"
13 #include "localization.h"
14 #include "SetPropertyStatus.h"
15
16 /*------------------------------------------------------------------------*/
17 int set_color_map_property( sciPointObj * pobj, int stackPointer, int valueType, int nbRow, int nbCol )
18 {
19   if ( !isParameterDoubleMatrix( valueType ) )
20   {
21     sciprint(_("Incompatible type for property %s.\n"),"color_map") ;
22     return SET_PROPERTY_ERROR ;
23   }
24
25   return sciSetColormap( pobj, getDoubleMatrixFromStack( stackPointer), nbRow, nbCol ) ;
26 }
27 /*------------------------------------------------------------------------*/