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

« back to all changes in this revision

Viewing changes to modules/graphics/src/c/getHandleProperty/set_axes_size_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:
35
35
/*------------------------------------------------------------------------*/
36
36
int set_axes_size_property(void* _pvCtx, char* pobjUID, size_t stackPointer, int valueType, int nbRow, int nbCol )
37
37
{
38
 
  double * newWindowSize = getDoubleMatrixFromStack( stackPointer ) ;
39
 
  BOOL status = FALSE;
40
 
  int intValues[2];
41
 
 
42
 
  if ( !isParameterDoubleMatrix( valueType ) )
43
 
  {
44
 
    Scierror(999, _("Wrong type for '%s' property: Real matrix expected.\n"), "axes_size");
45
 
    return SET_PROPERTY_ERROR ;
46
 
  }
47
 
 
48
 
  intValues[0] = (int) newWindowSize[0];
49
 
  intValues[1] = (int) newWindowSize[1];
50
 
 
51
 
  status = setGraphicObjectProperty(pobjUID, __GO_AXES_SIZE__, intValues, jni_int_vector, 2);
52
 
 
53
 
  if (status == TRUE)
54
 
  {
55
 
    return SET_PROPERTY_SUCCEED;
56
 
  }
57
 
  else
58
 
  {
59
 
    Scierror(999, _("'%s' property does not exist for this handle.\n"),"axes_size");
60
 
    return SET_PROPERTY_ERROR;
61
 
  }
 
38
    double * newWindowSize = stk( stackPointer ) ;
 
39
    BOOL status = FALSE;
 
40
    int intValues[2];
 
41
 
 
42
    if ( !( valueType == sci_matrix ) )
 
43
    {
 
44
        Scierror(999, _("Wrong type for '%s' property: Real matrix expected.\n"), "axes_size");
 
45
        return SET_PROPERTY_ERROR ;
 
46
    }
 
47
 
 
48
    intValues[0] = (int) newWindowSize[0];
 
49
    intValues[1] = (int) newWindowSize[1];
 
50
 
 
51
    status = setGraphicObjectProperty(pobjUID, __GO_AXES_SIZE__, intValues, jni_int_vector, 2);
 
52
 
 
53
    if (status == TRUE)
 
54
    {
 
55
        return SET_PROPERTY_SUCCEED;
 
56
    }
 
57
    else
 
58
    {
 
59
        Scierror(999, _("'%s' property does not exist for this handle.\n"), "axes_size");
 
60
        return SET_PROPERTY_ERROR;
 
61
    }
62
62
}
63
63
/*------------------------------------------------------------------------*/