~ubuntu-branches/ubuntu/raring/scilab/raring-proposed

« back to all changes in this revision

Viewing changes to modules/graphics/src/c/getHandleProperty/set_interp_color_vector_property.c

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-08-30 14:42:38 UTC
  • mfrom: (1.4.7)
  • Revision ID: package-import@ubuntu.com-20120830144238-c1y2og7dbm7m9nig
Tags: 5.4.0-beta-3-1~exp1
* New upstream release
* Update the scirenderer dep
* Get ride of libjhdf5-java dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    int iNumElements = 0;
40
40
    int* piNumElements = &iNumElements;
41
41
 
42
 
    if ( !isParameterDoubleMatrix( valueType ) )
 
42
    if ( !( valueType == sci_matrix ) )
43
43
    {
44
44
        Scierror(999, _("Wrong type for '%s' property: Real matrix expected.\n"), "interp_color_vector");
45
45
        return SET_PROPERTY_ERROR;
53
53
     */
54
54
    if (piNumElements == NULL)
55
55
    {
56
 
        Scierror(999, _("'%s' property does not exist for this handle.\n"),"data");
 
56
        Scierror(999, _("'%s' property does not exist for this handle.\n"), "data");
57
57
        return SET_PROPERTY_ERROR;
58
58
    }
59
59
 
60
 
    if( ( nbCol == 3 && iNumElements == 3 ) ||
61
 
        ( nbCol == 4 && iNumElements == 4 ) )
 
60
    if ( ( nbCol == 3 && iNumElements == 3 ) ||
 
61
            ( nbCol == 4 && iNumElements == 4 ) )
62
62
    {
63
63
        int tmp[4];
64
 
        getDoubleMatrixFromStack( stackPointer );
 
64
        stk( stackPointer );
65
65
 
66
66
        copyDoubleVectorToIntFromStack( stackPointer, tmp, nbCol );
67
67
 
73
73
        }
74
74
        else
75
75
        {
76
 
            Scierror(999, _("'%s' property does not exist for this handle.\n"),"interp_color_vector");
 
76
            Scierror(999, _("'%s' property does not exist for this handle.\n"), "interp_color_vector");
77
77
            return SET_PROPERTY_ERROR;
78
78
        }
79
79
 
80
80
    }
81
81
    else
82
82
    {
83
 
        Scierror(999, _("The number of column of the color vector must match the number of points defining the line (which must be %d or %d).\n"),3,4);
 
83
        Scierror(999, _("The number of column of the color vector must match the number of points defining the line (which must be %d or %d).\n"), 3, 4);
84
84
        return SET_PROPERTY_ERROR;
85
85
    }
86
86
}