Graphics: Matplot broken after uid refactor 59/13059/1
Calixte DENIZET [Thu, 31 Oct 2013 16:11:08 +0000 (17:11 +0100)]
Change-Id: Ia4916be0b4833c2535355d682ba2fc5f108da828

scilab/modules/graphic_objects/src/cpp/MatPlotDecomposer.cpp

index ed5d4a2..2d4e4ad 100644 (file)
@@ -50,6 +50,7 @@ int MatPlotDecomposer::fillTextureData(int id, unsigned char* buffer, int buffer
     // Indexed colors
     void * data = NULL;
     int parentFigure = 0;
+    int * piParentFigure = &parentFigure;
     double * colormap = NULL;
     int colormapSize = 0;
     int * piColormapSize = &colormapSize;
@@ -60,7 +61,7 @@ int MatPlotDecomposer::fillTextureData(int id, unsigned char* buffer, int buffer
 
     getGraphicObjectProperty(id, __GO_DATA_MODEL_Z__, jni_double_vector, &data);
     getGraphicObjectProperty(id, __GO_DATA_MODEL_MATPLOT_DATA_TYPE__, jni_int, (void**) &pidataType);
-    getGraphicObjectProperty(id, __GO_PARENT_FIGURE__, jni_string, (void**) &parentFigure);
+    getGraphicObjectProperty(id, __GO_PARENT_FIGURE__, jni_int, (void**) &piParentFigure);
     getGraphicObjectProperty(parentFigure, __GO_COLORMAP__, jni_double_vector, (void**) &colormap);
     getGraphicObjectProperty(parentFigure, __GO_COLORMAP_SIZE__, jni_int, (void**) &piColormapSize);
 
@@ -153,10 +154,11 @@ int MatPlotDecomposer::fillTextureData(int id, unsigned char* buffer, int buffer
     if (width * height * 4 == bufferLength)
     {
         int parentFigure = 0;
+        int * piParentFigure = &parentFigure;
         double* colormap = NULL;
         int colormapSize = 0;
         int* piColormapSize = &colormapSize;
-        getGraphicObjectProperty(id, __GO_PARENT_FIGURE__, jni_string, (void**) &parentFigure);
+        getGraphicObjectProperty(id, __GO_PARENT_FIGURE__, jni_int, (void**) &piParentFigure);
         getGraphicObjectProperty(parentFigure, __GO_COLORMAP__, jni_double_vector, (void**) &colormap);
         getGraphicObjectProperty(parentFigure, __GO_COLORMAP_SIZE__, jni_int, (void**) &piColormapSize);
         int textureHeight = getTextureHeight(id);