2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2002-2004 - INRIA - Djalel Abdemouche
4 * Copyright (C) 2004-2006 - INRIA - Fabrice Leray
5 * Copyright (C) 2005 - INRIA - Jean-Baptiste Silvy
6 * Copyright (C) 2010-2011 - DIGITEO - Manuel Juliachs
8 * This file must be used under the terms of the CeCILL.
9 * This source file is licensed as described in the file COPYING, which
10 * you should have received as part of this distribution. The terms
11 * are also available at
12 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
16 /*------------------------------------------------------------------------
18 * Graphic subroutines interface
19 --------------------------------------------------------------------------*/
24 #include "SetProperty.h"
25 #include "GetProperty.h"
26 #include "DrawObjects.h"
27 #include "BuildObjects.h"
28 #include "BasicAlgos.h"
29 #include "math_graphics.h"
34 #include "localization.h"
35 #include "MALLOC.h" /* MALLOC */
39 #include "HandleManagement.h"
40 #include "stack-def.h" /* bsiz */
42 #include "setGraphicObjectProperty.h"
43 #include "getGraphicObjectProperty.h"
44 #include "createGraphicObject.h"
45 #include "graphicObjectProperties.h"
46 #include "CurrentFigure.h"
47 #include "CurrentSubwin.h"
48 #include "CurrentObject.h"
51 * Put min and max of vector in dMin and dMax.
52 * If no min and max can't be found (no finite data in dMin or dMax),
53 * then use the default values
55 static void getDrect(const double vector[], int nbElements,
56 double * dMin, double * dMax,
57 double defaultMin, double defaultMax);
58 /*------------------------------------------------
60 * On recupere la figure courante, puis on recupere la sous fenetre qui y est selectionnee
61 * puis on contruit le rectangle, qu on le place comme objet courant
62 * ensuite il reste qu'appeler la fonction du dessin de l'objet
63 *-----------------------------------------------*/
65 void Objrect ( double * x ,
75 char* newObjUID = NULL;
76 char* psubwinUID = NULL;
77 char* pFigureUID = NULL;
79 pFigureUID = (char*)getCurrentFigure();
80 psubwinUID = (char*)getCurrentSubWin();
82 /* check if the auto_clear property is on and then erase everything */
84 /*newObjUID = ConstructRectangle(psubwinUID , *x, *y, *height, *width,
85 foreground, background, isfilled, isline);*/
87 newObjUID = constructRectangles(psubwinUID, *x, *y, *height, *width,
88 foreground == NULL ? -1 : *foreground,
89 background == NULL ? -1 : *background,
90 (int)isfilled, (int)isline);
92 if (newObjUID == NULL)
94 /* an error occurred */
99 setCurrentObject(newObjUID);
100 *hdl = getHandle(newObjUID);
102 releaseGraphicObjectProperty(-1, newObjUID, jni_string, 0);
106 /*----------------------------------------------
108 *-----------------------------------------------*/
110 void Objarc( double * angle1 ,
122 char * psubwinUID = NULL;
123 char * pobjUID = NULL;
125 psubwinUID = (char*)getCurrentSubWin();
127 pobjUID = ConstructArc(psubwinUID, *x, *y,
128 *height, *width, *angle1, *angle2, foreground, background, isfilled, isline);
129 setCurrentObject(pobjUID);
131 *hdl = getHandle(pobjUID);
132 releaseGraphicObjectProperty(__GO_PARENT__, pobjUID, jni_string, 1);
135 /*------------------------------------------------
137 *-----------------------------------------------*/
139 void Objpoly ( double * x ,
146 char * pfigureUID = NULL;
147 char * psubwinUID = NULL;
148 char * pobjUID = NULL;
150 psubwinUID = (char*)getCurrentSubWin();
156 int absmark = abs(mark);
157 pobjUID = ConstructPolyline(psubwinUID, x, y, PD0, closed, n, 1,
158 NULL, NULL, &absmark, NULL, NULL, FALSE, FALSE, TRUE, FALSE);
162 pobjUID = ConstructPolyline(psubwinUID, x, y, PD0, closed, n, 1,
163 &mark, NULL, NULL, NULL, NULL, TRUE, FALSE, FALSE, FALSE);
168 Scierror(999, _("%s: No more memory.\n"), "Objpoly");
172 setCurrentObject(pobjUID);
173 *hdl = getHandle(pobjUID);
175 releaseGraphicObjectProperty(__GO_POLYLINE__, pobjUID, jni_string, 1);
179 /*------------------------------------------------
181 *-----------------------------------------------*/
183 void Objfpoly ( double * x ,
190 char* psubwinUID = NULL;
191 char* pobjUID = NULL;
194 int contourcolor = 0;
195 int *piContourColor = &contourcolor;
197 int closed = 1; /* we close the polyline by default */
199 psubwinUID = (char*)getOrCreateDefaultSubwin();
205 /* interpolated shading is "on" */
206 pobjUID = ConstructPolyline(psubwinUID, x, y, PD0, closed, n,
207 1, NULL, style, NULL, NULL, NULL, FALSE, TRUE, FALSE, TRUE);
212 /* flat mode is "on" */
215 fillcolor = abs(*style);
216 pobjUID = ConstructPolyline(psubwinUID, x, y, PD0, closed, n,
217 1, NULL, &fillcolor, NULL, NULL, NULL, FALSE, TRUE, FALSE, FALSE);
219 else if (*style == 0)
221 getGraphicObjectProperty(psubwinUID, __GO_LINE_COLOR__, jni_int, (void**)&piContourColor);
222 pobjUID = ConstructPolyline(psubwinUID, x, y, PD0, closed, n,
223 1, &contourcolor, NULL, NULL, NULL, NULL, TRUE, FALSE, FALSE, FALSE);
229 getGraphicObjectProperty(psubwinUID, __GO_LINE_COLOR__, jni_int, (void**)&piContourColor);
230 pobjUID = ConstructPolyline(psubwinUID, x, y, PD0, closed, n,
231 1, &contourcolor, &fillcolor, NULL, NULL, NULL, TRUE, TRUE, FALSE, FALSE);
238 Scierror(999, _("%s: No more memory.\n"), "Objfpoly");
242 setCurrentObject(pobjUID);
243 *hdl = getHandle(pobjUID);
245 releaseGraphicObjectProperty(__GO_PARENT__, pobjUID, jni_string, 1);
249 /*-----------------------------------------------------------
251 *-----------------------------------------------------------*/
252 void Objsegs ( int * style,
260 char *pobjUID = NULL;
261 char *psubwinUID = NULL;
262 int type = 0, colored = 0;
263 double *fx = NULL, *fy = NULL; // No fx or fy
264 int typeofchamp = -1; /* no champ here, only segs ; this info is useless */
267 psubwinUID = (char*)getCurrentSubWin();
269 pobjUID = ConstructSegs(psubwinUID, type,
270 x, y, z, n1, n1, (z == NULL ? 0 : n1), // x, y and z have the same size n1
271 fx, fy, flag, style, arsize, colored, typeofchamp);
275 Scierror(999, _("%s: No more memory.\n"), "Objsegs");
279 setCurrentObject(pobjUID);
280 releaseGraphicObjectProperty(__GO_SEGS__, pobjUID, jni_string, 1);
282 /*-----------------------------------------------------------
284 *-----------------------------------------------------------*/
286 /* box is an OUTPUT re-used inside matdes.c in scixstring */
287 void Objstring( char ** fname ,
303 sciTextAlignment alignment )
305 char * psubwinUID = NULL;
306 char * pobjUID = NULL;
307 char * pfigureUID = NULL;
309 pfigureUID = (char*)getCurrentFigure();
310 psubwinUID = (char*)getCurrentSubWin();
314 pobjUID = ConstructText( psubwinUID ,
332 Scierror(999, _("%s: No more memory.\n"), "Objstring");
336 *hdl = getHandle(pobjUID);
338 setGraphicObjectProperty(pobjUID, __GO_FONT_ANGLE__, angle, jni_double, 1);
342 /*------------------------------------------------
344 *-----------------------------------------------*/
346 void Objplot2d ( int ptype ,
359 plot2dn(ptype, logflags, x, y, n1, n2, style, strflag, legend, brect, aaint, flagNax, 4L, bsiz);
362 /*------------------------------------------------
364 *-----------------------------------------------*/
365 void Objgrayplot ( double x[] ,
375 C2F(xgray)(x, y, z, n1, n2, strflag, brect, aaint, flagNax, bsiz );
378 /*------------------------------------------------
380 *-----------------------------------------------*/
381 void Objmatplot (double z[] ,
389 C2F(xgray1)(z, n1, n2, strflag, brect, aaint, flagNax, bsiz);
392 /*------------------------------------------------
394 *-----------------------------------------------*/
395 void Objmatplot1 ( double z[],
400 C2F(xgray2)(z, n1, n2, xrect);
403 /*------------------------------------------------
405 *-----------------------------------------------*/
406 void Objplot3d ( char * fname ,
420 int * m1 , /*Adding F.Leray 12.03.04 and 19.03.04*/
428 /* F.Leray 25.04.05 : warning here legends means "X@Y@Z": it is labels writings!! */
429 /* legends has not the same meaning than inside plot2dn (there, it is really the legends of the plotted curves)*/
431 sciTypeOf3D typeof3d;
436 char *psubwinUID = NULL;
437 char *pobjUID = NULL;
438 char *parentFigureUID = NULL;
441 double rotationAngles[2];
442 double* dataBounds = NULL;
447 char* labelId = NULL;
448 /* char * buff = NULL; */
456 int *piFirstPlot = &firstPlot;
461 int *piAutoScale = &autoScale;
466 char *pNewSurfaceUID = NULL;
469 /* Initialisation drect A.C pour debuggueur */
477 /* =================================================
478 * Force SubWindow properties according to arguments
479 * ================================================= */
481 parentFigureUID = (char*)getCurrentFigure();
482 psubwinUID = (char*)getCurrentSubWin();
488 setGraphicObjectProperty(psubwinUID, __GO_VIEW__, &view, jni_int, 1);
490 if ( legend != NULL )
492 int textDimensions[2] = {1, 1};
493 /* F.Leray 25.04.05 replace the default labels by the user labels if specified */
494 loc = (char *) MALLOC( (strlen(legend) + 1) * sizeof(char));
497 Scierror(999, _("%s: No more memory.\n"), "Objplot3d");
502 /* legx=strtok_r(loc,"@",&buff); */
503 legx = strtok(loc, "@");
507 getGraphicObjectProperty(psubwinUID, __GO_X_AXIS_LABEL__, jni_string, (void **)&labelId);
509 setGraphicObjectProperty(labelId, __GO_TEXT_ARRAY_DIMENSIONS__, textDimensions, jni_int_vector, 2);
510 setGraphicObjectProperty(labelId, __GO_TEXT_STRINGS__, &legx, jni_string_vector, textDimensions[0]*textDimensions[1]);
513 /* legy=strtok_r((char *)0,"@",&buff); */
514 legy = strtok((char *)NULL, "@"); /* NULL to begin at the last read character */
517 getGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_LABEL__, jni_string, (void **)&labelId);
519 setGraphicObjectProperty(labelId, __GO_TEXT_ARRAY_DIMENSIONS__, textDimensions, jni_int_vector, 2);
520 setGraphicObjectProperty(labelId, __GO_TEXT_STRINGS__, &legy, jni_string_vector, textDimensions[0]*textDimensions[1]);
523 /* legz=strtok_r((char *)0,"@",&buff); */
524 legz = strtok((char *)NULL, "@");
527 getGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_LABEL__, jni_string, (void **)&labelId);
529 setGraphicObjectProperty(labelId, __GO_TEXT_ARRAY_DIMENSIONS__, textDimensions, jni_int_vector, 2);
530 setGraphicObjectProperty(labelId, __GO_TEXT_STRINGS__, &legz, jni_string_vector, textDimensions[0]*textDimensions[1]);
534 /* Force psubwin->logflags to linear */
537 setGraphicObjectProperty(psubwinUID, __GO_X_AXIS_LOG_FLAG__, &linLogFlag, jni_bool, 1);
538 setGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_LOG_FLAG__, &linLogFlag, jni_bool, 1);
539 setGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_LOG_FLAG__, &linLogFlag, jni_bool, 1);
542 getGraphicObjectProperty(psubwinUID, __GO_FIRST_PLOT__, jni_bool, (void **)&piFirstPlot);
544 if (firstPlot == 0 && (iflag[2] == 0 || iflag[2] == 1))
546 /* Nothing to do: we leave as before */
552 if (iflag[2] == 0 || iflag[2] == 1)
560 setGraphicObjectProperty(psubwinUID, __GO_X_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
561 setGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
562 setGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
564 setGraphicObjectProperty(psubwinUID, __GO_BOX_TYPE__, &box, jni_int, 1);
567 getGraphicObjectProperty(psubwinUID, __GO_X_AXIS_LABEL__, jni_string, (void **)&labelId);
568 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
569 getGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_LABEL__, jni_string, (void **)&labelId);
570 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
571 getGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_LABEL__, jni_string, (void **)&labelId);
572 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
574 /*else no changes : the axes visible properties are driven by the previous plot */
576 else if (iflag[2] == 2)
581 /* for 2d use only (when switching to 2d mode) */
582 setGraphicObjectProperty(psubwinUID, __GO_BOX_TYPE__, &box, jni_int, 1);
585 setGraphicObjectProperty(psubwinUID, __GO_X_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
586 setGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
587 setGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
590 getGraphicObjectProperty(psubwinUID, __GO_X_AXIS_LABEL__, jni_string, (void **)&labelId);
591 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
592 getGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_LABEL__, jni_string, (void **)&labelId);
593 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
594 getGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_LABEL__, jni_string, (void **)&labelId);
595 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
597 else if (iflag[2] == 3)
602 /* for 2d use only (when switching to 2d mode) */
603 setGraphicObjectProperty(psubwinUID, __GO_BOX_TYPE__, &box, jni_int, 1);
606 setGraphicObjectProperty(psubwinUID, __GO_X_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
607 setGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
608 setGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
611 getGraphicObjectProperty(psubwinUID, __GO_X_AXIS_LABEL__, jni_string, (void **)&labelId);
612 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
613 getGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_LABEL__, jni_string, (void **)&labelId);
614 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
615 getGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_LABEL__, jni_string, (void **)&labelId);
616 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
618 else if (iflag[2] == 4)
622 setGraphicObjectProperty(psubwinUID, __GO_BOX_TYPE__, &box, jni_int, 1);
625 setGraphicObjectProperty(psubwinUID, __GO_X_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
626 setGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
627 setGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
630 getGraphicObjectProperty(psubwinUID, __GO_X_AXIS_LABEL__, jni_string, (void **)&labelId);
631 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
632 getGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_LABEL__, jni_string, (void **)&labelId);
633 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
634 getGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_LABEL__, jni_string, (void **)&labelId);
635 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
639 rotationAngles[0] = *alpha;
640 rotationAngles[1] = *theta;
642 setGraphicObjectProperty(psubwinUID, __GO_ROTATION_ANGLES__, rotationAngles, jni_double_vector, 2);
644 getGraphicObjectProperty(psubwinUID, __GO_DATA_BOUNDS__, jni_double_vector, (void **)&dataBounds);
646 getGraphicObjectProperty(psubwinUID, __GO_AUTO_SCALE__, jni_bool, (void **)&piAutoScale);
650 /* compute and merge new specified bounds with data bounds */
653 case 0: /* do not change data bounds */
658 case 7 : /* Force data bounds=ebox */
659 drect[0] = ebox[0]; /*xmin*/
660 drect[2] = ebox[2]; /*ymin*/
661 drect[1] = ebox[1]; /*xmax*/
662 drect[3] = ebox[3]; /*ymax*/
663 drect[4] = ebox[4]; /*zmin*/
664 drect[5] = ebox[5]; /*zmax*/
669 case 8:/* Force data bounds to the x and y bounds */
670 getDrect(x, (*m1) * (*n1), &drect[0], &drect[1], dataBounds[0], dataBounds[1]);
671 getDrect(y, (*m2) * (*n2), &drect[2], &drect[3], dataBounds[2], dataBounds[3]);
672 getDrect(z, (*m3) * (*n3), &drect[4], &drect[5], dataBounds[4], dataBounds[5]);
676 /* merge data bounds and drect */
679 drect[0] = Min(dataBounds[0], drect[0]); /* xmin */
680 drect[1] = Max(dataBounds[1], drect[1]); /* xmax */
681 drect[2] = Min(dataBounds[2], drect[2]); /* ymin */
682 drect[3] = Max(dataBounds[3], drect[3]); /* ymax */
683 drect[4] = Min(dataBounds[4], drect[4]); /* zmin */
684 drect[5] = Max(dataBounds[5], drect[5]); /* zmax */
689 setGraphicObjectProperty(psubwinUID, __GO_DATA_BOUNDS__, drect, jni_double_vector, 6);
695 isoview = ( iflag[1] == 3 || iflag[1] == 4 || iflag[1] == 5 || iflag[1] == 6);
697 setGraphicObjectProperty(psubwinUID, __GO_ISOVIEW__, &isoview, jni_bool, 1);
700 /* =================================================
701 * Analyze arguments to find entity type
702 * ================================================= */
708 if (strcmp(fname, "plot3d1") == 0)
710 typeof3d = SCI_FAC3D;
715 typeof3d = SCI_FAC3D;
719 else if (*izcol == 2)
721 typeof3d = SCI_FAC3D;
726 typeof3d = SCI_FAC3D;
730 else if (*isfac == 0)
732 if (strcmp(fname, "plot3d1") == 0)
734 typeof3d = SCI_PLOT3D;
739 typeof3d = SCI_PLOT3D;
745 typeof3d = SCI_PARAM3D1;
749 /* =================================================
750 * Construct the Entities
751 * ================================================= */
753 /*Distinction here between SCI_PARAM3D1 and others*/
754 if ( typeof3d != SCI_PARAM3D1 )
758 /* x is considered as a matrix */
761 else if ( *m1 == 1 ) /* x is a row vector */
765 else if ( *n1 == 1 ) /* x is a column vector */
769 else /* x is a matrix */
776 int monotony = checkMonotony( x, dimvectx );
779 Scierror(999, _("%s: x vector is not monotonous.\n"), "Objplot3d");
788 /* y is considered as a matrix */
791 else if ( *m2 == 1 ) /* y is a row vector */
795 else if ( *n2 == 1 ) /* y is a column vector */
799 else /* y is a matrix */
806 /* test the monotony on y*/
807 int monotony = checkMonotony( y, dimvecty );
810 Scierror(999, _("%s: y vector is not monotonous.\n"), "Objplot3d");
817 pNewSurfaceUID = ConstructSurface( psubwinUID, typeof3d,
818 x, y, z, zcol, *izcol, *m, *n, iflag, ebox, flagcolor,
819 isfac, m1, n1, m2, n2, m3, n3, m3n, n3n);
821 if ( pNewSurfaceUID == NULL )
823 Scierror(999, _("%s: No more memory.\n"), "Objplot3d");
827 setCurrentObject( pNewSurfaceUID );
829 /* Force clipping, 1: CLIPGRF */
831 setGraphicObjectProperty(pNewSurfaceUID, __GO_CLIP_STATE__, &clipState, jni_int, 1);
833 releaseGraphicObjectProperty(__GO_PARENT__, pNewSurfaceUID, jni_string, 1);
837 char* pNewPolylineUID = NULL;
838 char* currentSubwinUID = NULL;
840 if ((hdltab = MALLOC (*n * sizeof (long))) == NULL)
842 Scierror(999, "%s: No more memory.\n", fname);
846 currentSubwinUID = (char*)getCurrentSubWin();
848 for (i = 0; i < *n; ++i)
850 /* F.Leray Pb here: In fact we do not create a Surface but one or several 3D Polylines
851 Pb comes when wanting to access the fields "surface_color" or "flag" for example
852 in function sciSet (cf. matdes.c).
853 Question 1: Are these properties accessible from a SCI_PARAM3D1 ?
854 Question 2: Is "flag" obsolete and replaced by "color_mode"?*/
856 if ((*n > 0) && (zcol != (double *)NULL))
858 if ((int) zcol[i] > 0)
860 int intzcol = (int) zcol[i];
861 pNewPolylineUID = ConstructPolyline
863 &(x[*m * i]), &(y[*m * i]), &(z[*m * i]), 0, *m, 1,
864 &intzcol, NULL, NULL, NULL, NULL, TRUE, FALSE, FALSE, FALSE);
868 int intzcol = (int) - zcol[i];
869 pNewPolylineUID = ConstructPolyline
871 &(x[*m * i]), &(y[*m * i]), &(z[*m * i]), 0, *m, 1,
872 NULL, NULL, &intzcol, NULL, NULL, FALSE, FALSE, TRUE, FALSE);
877 /* default case, nothing is given */
879 int *piCurColor = &curcolor;
881 getGraphicObjectProperty(currentSubwinUID, __GO_LINE_COLOR__, jni_int, (void**)&piCurColor);
883 pNewPolylineUID = ConstructPolyline(currentSubwinUID,
884 &(x[*m * i]), &(y[*m * i]), &(z[*m * i]), 0, *m, 1,
885 &curcolor, NULL, NULL, NULL, NULL, TRUE, FALSE, FALSE, FALSE);
888 if (pNewPolylineUID == NULL)
890 Scierror(999, _("%s: No more memory.\n"), fname);
895 setCurrentObject(pNewPolylineUID);
896 setGraphicObjectRelationship(currentSubwinUID, pNewPolylineUID);
897 releaseGraphicObjectProperty(__GO_PARENT__, pNewPolylineUID, jni_string, 1);
898 pNewPolylineUID = NULL;
900 pobjUID = (char*)getCurrentObject();
902 /* Force clipping, 1: CLIPGRF */
904 setGraphicObjectProperty(pobjUID, __GO_CLIP_STATE__, &clipState, jni_int, 1);
906 hdltab[i] = getHandle(pobjUID);
909 /** construct Compound and make it current object**/
912 char* o = ConstructCompound (hdltab, *n);
914 releaseGraphicObjectProperty(__GO_PARENT__, o, jni_string, 1);
919 /* =================================================
921 * ================================================= */
923 // subwin has been modified
926 setGraphicObjectProperty(psubwinUID, __GO_FIRST_PLOT__, &firstPlot, jni_bool, 1);
932 /*-----------------------------------------------------------
934 *-----------------------------------------------------------*/
936 void Objdrawaxis ( char dir ,
952 char* pobjUID = NULL;
953 char* psubwinUID = NULL;
955 psubwinUID = (char*)getCurrentSubWin();
959 pobjUID = ConstructAxis(
961 dir, tics, x, *nx, y, *ny, val, subint, format, font, textcol, ticscol, flag, seg, nb_tics_labels);
965 Scierror(999, _("%s: No more memory.\n"), "Objdrawaxis");
969 setCurrentObject(pobjUID);
970 releaseGraphicObjectProperty(__GO_PARENT__, pobjUID, jni_string, 1);
973 /*-----------------------------------------------------------
975 *-----------------------------------------------------------*/
977 void Objnumb( char * fname ,
978 unsigned long fname_len,
986 /*** faire une macro scilab sur xstring ****/
991 /*------------------------------------------------
993 *-----------------------------------------------*/
994 void Objfec ( double x[] ,
1010 C2F(fec)(x, y, noeud, fun, n, m, strflag, legend, brect, aaint,
1011 Zminmax, Colminmax, ColOut, WithMesh, flagNax, 4L, bsiz);
1013 /*------------------------------------------------------------------------*/
1014 static void getDrect(const double vector[], int nbElements,
1015 double * dMin, double * dMax,
1016 double defaultMin, double defaultMax)
1018 if (containsOneFiniteElement(vector, nbElements))
1020 *dMin = Mini(vector, nbElements);
1021 *dMax = Maxi(vector, nbElements);
1029 /*------------------------------------------------------------------------*/