~ubuntu-branches/ubuntu/trusty/scilab/trusty

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-08-02 11:02:49 UTC
  • mfrom: (1.4.6)
  • Revision ID: package-import@ubuntu.com-20120802110249-0v5953emkp25geuz
Tags: 5.4.0-beta-2-1~exp1
* New upstream release
* Remove libscilab-java (remove upstream). Use libscilab2-java instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
/* F.Leray 29.04.05 */
44
44
/* the champ data is now set as a tlist (like for surface objects) */
45
45
/* setchampdata(pobj,cstk(l2), &l3, &numrow3, &numcol3, fname) */
46
 
int setchampdata( char* pobjUID, AssignedList * tlist )
 
46
int setchampdata(void* _pvCtx, char* pobjUID, AssignedList * tlist )
47
47
{
48
48
    int nbRow[4];
49
49
    int nbCol[4];
81
81
 
82
82
    if ( nbRow[0] * nbCol[0] == 0 || nbRow[1] * nbCol[1] == 0 || nbRow[2] * nbCol[2] == 0 || nbRow[3] * nbCol[3] == 0 )
83
83
    {
84
 
        return sciReturnEmptyMatrix();
 
84
        return sciReturnEmptyMatrix(_pvCtx);
85
85
    }
86
86
 
87
87
    /* Update the champ's number of arrows and dimensions then set the coordinates */
100
100
/* F.Leray 29.04.05 */
101
101
/* the grayplot data is now set as a tlist (like for surface and champ objects) */
102
102
/* setgrayplot(pobj,cstk(l2), &l3, &numrow3, &numcol3, fname) */
103
 
int setgrayplotdata( char* pobjUID, AssignedList * tlist )
 
103
int setgrayplotdata(void* _pvCtx, char* pobjUID, AssignedList * tlist )
104
104
{
105
105
    BOOL result;
106
106
 
134
134
 
135
135
    if ( nbRow[0] * nbCol[0] == 0 || nbRow[1] * nbCol[1] == 0 || nbRow[2] * nbCol[2] == 0 )
136
136
    {
137
 
        return sciReturnEmptyMatrix();
 
137
        return sciReturnEmptyMatrix(_pvCtx);
138
138
    }
139
139
 
140
140
    /*
163
163
}
164
164
/*--------------------------------------------------------------------------*/
165
165
/* set3ddata(pobj,cstk(l2), &l3, &numrow3, &numcol3) */
166
 
int set3ddata( char* pobjUID, AssignedList * tlist )
 
166
int set3ddata(void* _pvCtx, char* pobjUID, AssignedList * tlist )
167
167
{
168
168
    char* type;
169
169
 
219
219
 
220
220
    if ( m1 * n1 == 0 || m2 * n2 == 0 || m3 * n3 == 0 )
221
221
    {
222
 
        return sciReturnEmptyMatrix();
 
222
        return sciReturnEmptyMatrix(_pvCtx);
223
223
    }
224
224
 
225
225
    /* get color size if exists */
249
249
        izcol = 0;
250
250
    }
251
251
 
252
 
    getGraphicObjectProperty(pobjUID, __GO_TYPE__, jni_string, &type);
 
252
    getGraphicObjectProperty(pobjUID, __GO_TYPE__, jni_string, (void **)&type);
253
253
 
254
254
    if (strcmp(type, __GO_FAC3D__) == 0)
255
255
    {
423
423
    return SET_PROPERTY_SUCCEED;
424
424
}
425
425
/*--------------------------------------------------------------------------*/
426
 
int set_data_property(char* pobjUID, size_t stackPointer, int valueType, int nbRow, int nbCol)
 
426
int set_data_property(void* _pvCtx, char* pobjUID, size_t stackPointer, int valueType, int nbRow, int nbCol)
427
427
{
428
428
    char* type;
429
429
 
430
 
    getGraphicObjectProperty(pobjUID, __GO_TYPE__, jni_string, &type);
 
430
    getGraphicObjectProperty(pobjUID, __GO_TYPE__, jni_string, (void **)&type);
431
431
 
432
432
    if (strcmp(type, __GO_CHAMP__) == 0)
433
433
    {
447
447
            return SET_PROPERTY_ERROR;
448
448
        }
449
449
 
450
 
        status = setchampdata( pobjUID, tlist );
 
450
        status = setchampdata(_pvCtx, pobjUID, tlist);
451
451
        destroyAssignedList( tlist );
452
452
        return status;
453
453
    }
469
469
            return SET_PROPERTY_ERROR;
470
470
        }
471
471
 
472
 
        status = setgrayplotdata( pobjUID, tlist );
 
472
        status = setgrayplotdata(_pvCtx, pobjUID, tlist);
473
473
        destroyAssignedList( tlist );
474
474
        return status;
475
475
    }
506
506
            return SET_PROPERTY_ERROR;
507
507
        }
508
508
 
509
 
        status = set3ddata( pobjUID, tlist );
 
509
        status = set3ddata(_pvCtx, pobjUID, tlist);
510
510
        destroyAssignedList( tlist );
511
511
        return status;
512
512