set axes_size and/or figure_size after figure creation 17/14217/1
Antoine ELIAS [Fri, 28 Mar 2014 15:16:59 +0000 (16:16 +0100)]
Change-Id: I35594fb316c0ad86b7335640ecaea5211415f6b4

scilab/modules/gui/sci_gateway/c/sci_figure.c

index 2a64a3e..7a9e200 100644 (file)
@@ -410,6 +410,21 @@ int sci_figure(char * fname, unsigned long fname_len)
         iFig = createFigure(bDockable, iMenubarType, iToolbarType, bDefaultAxes, bVisible, figureSize, axesSize, position, bMenuBar, bToolBar, bInfoBar);
         setGraphicObjectProperty(iFig, __GO_ID__, &iNewId, jni_int, 1);
         iAxes = setDefaultProperties(iFig, bDefaultAxes, figureSize || axesSize ? FALSE : TRUE);
+        if (figureSize)
+        {
+            int figure[2];
+            figure[0] = (int)figureSize[0];
+            figure[1] = (int)figureSize[1];
+            setGraphicObjectProperty(iFig, __GO_SIZE__, figure, jni_int_vector, 2);
+        }
+
+        if (axesSize)
+        {
+            int axes[2];
+            axes[0] = (int)axesSize[0];
+            axes[1] = (int)axesSize[1];
+            setGraphicObjectProperty(iFig, __GO_AXES_SIZE__, axes, jni_int_vector, 2);
+        }
     }
 
     //set(iFig, iPos, iPos + 1)