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);
104 /*----------------------------------------------
106 *-----------------------------------------------*/
108 void Objarc( double * angle1 ,
120 char * psubwinUID = NULL;
121 char * pobjUID = NULL;
123 psubwinUID = (char*)getCurrentSubWin();
125 pobjUID = ConstructArc(psubwinUID, *x, *y,
126 *height, *width, *angle1, *angle2, foreground, background, isfilled, isline);
127 setCurrentObject(pobjUID);
129 *hdl = getHandle(pobjUID);
130 releaseGraphicObjectProperty(__GO_PARENT__, pobjUID, jni_string, 1);
133 /*------------------------------------------------
135 *-----------------------------------------------*/
137 void Objpoly ( double * x ,
144 char * pfigureUID = NULL;
145 char * psubwinUID = NULL;
146 char * pobjUID = NULL;
148 psubwinUID = (char*)getCurrentSubWin();
154 int absmark = abs(mark);
155 pobjUID = ConstructPolyline(psubwinUID, x, y, PD0, closed, n, 1,
156 NULL, NULL, &absmark, NULL, NULL, FALSE, FALSE, TRUE, FALSE);
160 pobjUID = ConstructPolyline(psubwinUID, x, y, PD0, closed, n, 1,
161 &mark, NULL, NULL, NULL, NULL, TRUE, FALSE, FALSE, FALSE);
166 Scierror(999, _("%s: No more memory.\n"), "Objpoly");
170 setCurrentObject(pobjUID);
171 *hdl = getHandle(pobjUID);
175 /*------------------------------------------------
177 *-----------------------------------------------*/
179 void Objfpoly ( double * x ,
186 char* psubwinUID = NULL;
187 char* pobjUID = NULL;
190 int contourcolor = 0;
191 int *piContourColor = &contourcolor;
193 int closed = 1; /* we close the polyline by default */
195 psubwinUID = (char*)getOrCreateDefaultSubwin();
201 /* interpolated shading is "on" */
202 pobjUID = ConstructPolyline(psubwinUID, x, y, PD0, closed, n,
203 1, NULL, style, NULL, NULL, NULL, FALSE, TRUE, FALSE, TRUE);
208 /* flat mode is "on" */
211 fillcolor = abs(*style);
212 pobjUID = ConstructPolyline(psubwinUID, x, y, PD0, closed, n,
213 1, NULL, &fillcolor, NULL, NULL, NULL, FALSE, TRUE, FALSE, FALSE);
215 else if (*style == 0)
217 getGraphicObjectProperty(psubwinUID, __GO_LINE_COLOR__, jni_int, (void**)&piContourColor);
218 pobjUID = ConstructPolyline(psubwinUID, x, y, PD0, closed, n,
219 1, &contourcolor, NULL, NULL, NULL, NULL, TRUE, FALSE, FALSE, FALSE);
225 getGraphicObjectProperty(psubwinUID, __GO_LINE_COLOR__, jni_int, (void**)&piContourColor);
226 pobjUID = ConstructPolyline(psubwinUID, x, y, PD0, closed, n,
227 1, &contourcolor, &fillcolor, NULL, NULL, NULL, TRUE, TRUE, FALSE, FALSE);
234 Scierror(999, _("%s: No more memory.\n"), "Objfpoly");
238 setCurrentObject(pobjUID);
239 *hdl = getHandle(pobjUID);
241 releaseGraphicObjectProperty(__GO_PARENT__, pobjUID, jni_string, 1);
245 /*-----------------------------------------------------------
247 *-----------------------------------------------------------*/
248 void Objsegs ( int * style,
256 char *pobjUID = NULL;
257 char *psubwinUID = NULL;
258 int type = 0, colored = 0;
259 double *fx = NULL, *fy = NULL; // No fx or fy
260 int typeofchamp = -1; /* no champ here, only segs ; this info is useless */
263 psubwinUID = (char*)getCurrentSubWin();
265 pobjUID = ConstructSegs(psubwinUID, type,
266 x, y, z, n1, n1, (z == NULL ? 0 : n1), // x, y and z have the same size n1
267 fx, fy, flag, style, arsize, colored, typeofchamp);
271 Scierror(999, _("%s: No more memory.\n"), "Objsegs");
275 setCurrentObject(pobjUID);
277 /*-----------------------------------------------------------
279 *-----------------------------------------------------------*/
281 /* box is an OUTPUT re-used inside matdes.c in scixstring */
282 void Objstring( char ** fname ,
298 sciTextAlignment alignment )
300 char * psubwinUID = NULL;
301 char * pobjUID = NULL;
302 char * pfigureUID = NULL;
304 pfigureUID = (char*)getCurrentFigure();
305 psubwinUID = (char*)getCurrentSubWin();
309 pobjUID = ConstructText( psubwinUID ,
327 Scierror(999, _("%s: No more memory.\n"), "Objstring");
331 *hdl = getHandle(pobjUID);
333 setGraphicObjectProperty(pobjUID, __GO_FONT_ANGLE__, angle, jni_double, 1);
337 /*------------------------------------------------
339 *-----------------------------------------------*/
341 void Objplot2d ( int ptype ,
354 plot2dn(ptype, logflags, x, y, n1, n2, style, strflag, legend, brect, aaint, flagNax, 4L, bsiz);
357 /*------------------------------------------------
359 *-----------------------------------------------*/
360 void Objgrayplot ( double x[] ,
370 C2F(xgray)(x, y, z, n1, n2, strflag, brect, aaint, flagNax, bsiz );
373 /*------------------------------------------------
375 *-----------------------------------------------*/
376 void Objmatplot (double z[] ,
384 C2F(xgray1)(z, n1, n2, strflag, brect, aaint, flagNax, bsiz);
387 /*------------------------------------------------
389 *-----------------------------------------------*/
390 void Objmatplot1 ( double z[],
395 C2F(xgray2)(z, n1, n2, xrect);
398 /*------------------------------------------------
400 *-----------------------------------------------*/
401 void Objplot3d ( char * fname ,
415 int * m1 , /*Adding F.Leray 12.03.04 and 19.03.04*/
423 /* F.Leray 25.04.05 : warning here legends means "X@Y@Z": it is labels writings!! */
424 /* legends has not the same meaning than inside plot2dn (there, it is really the legends of the plotted curves)*/
426 sciTypeOf3D typeof3d;
431 char *psubwinUID = NULL;
432 char *pobjUID = NULL;
433 char *parentFigureUID = NULL;
436 double rotationAngles[2];
437 double* dataBounds = NULL;
442 char* labelId = NULL;
443 /* char * buff = NULL; */
451 int *piFirstPlot = &firstPlot;
456 int *piAutoScale = &autoScale;
461 char *pNewSurfaceUID = NULL;
464 /* Initialisation drect A.C pour debuggueur */
472 /* =================================================
473 * Force SubWindow properties according to arguments
474 * ================================================= */
476 parentFigureUID = (char*)getCurrentFigure();
477 psubwinUID = (char*)getCurrentSubWin();
483 setGraphicObjectProperty(psubwinUID, __GO_VIEW__, &view, jni_int, 1);
485 if ( legend != NULL )
487 int textDimensions[2] = {1, 1};
488 /* F.Leray 25.04.05 replace the default labels by the user labels if specified */
489 loc = (char *) MALLOC( (strlen(legend) + 1) * sizeof(char));
492 Scierror(999, _("%s: No more memory.\n"), "Objplot3d");
497 /* legx=strtok_r(loc,"@",&buff); */
498 legx = strtok(loc, "@");
502 getGraphicObjectProperty(psubwinUID, __GO_X_AXIS_LABEL__, jni_string, (void **)&labelId);
504 setGraphicObjectProperty(labelId, __GO_TEXT_ARRAY_DIMENSIONS__, textDimensions, jni_int_vector, 2);
505 setGraphicObjectProperty(labelId, __GO_TEXT_STRINGS__, &legx, jni_string_vector, textDimensions[0]*textDimensions[1]);
508 /* legy=strtok_r((char *)0,"@",&buff); */
509 legy = strtok((char *)NULL, "@"); /* NULL to begin at the last read character */
512 getGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_LABEL__, jni_string, (void **)&labelId);
514 setGraphicObjectProperty(labelId, __GO_TEXT_ARRAY_DIMENSIONS__, textDimensions, jni_int_vector, 2);
515 setGraphicObjectProperty(labelId, __GO_TEXT_STRINGS__, &legy, jni_string_vector, textDimensions[0]*textDimensions[1]);
518 /* legz=strtok_r((char *)0,"@",&buff); */
519 legz = strtok((char *)NULL, "@");
522 getGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_LABEL__, jni_string, (void **)&labelId);
524 setGraphicObjectProperty(labelId, __GO_TEXT_ARRAY_DIMENSIONS__, textDimensions, jni_int_vector, 2);
525 setGraphicObjectProperty(labelId, __GO_TEXT_STRINGS__, &legz, jni_string_vector, textDimensions[0]*textDimensions[1]);
529 /* Force psubwin->logflags to linear */
532 setGraphicObjectProperty(psubwinUID, __GO_X_AXIS_LOG_FLAG__, &linLogFlag, jni_bool, 1);
533 setGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_LOG_FLAG__, &linLogFlag, jni_bool, 1);
534 setGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_LOG_FLAG__, &linLogFlag, jni_bool, 1);
537 getGraphicObjectProperty(psubwinUID, __GO_FIRST_PLOT__, jni_bool, (void **)&piFirstPlot);
539 if (firstPlot == 0 && (iflag[2] == 0 || iflag[2] == 1))
541 /* Nothing to do: we leave as before */
547 if (iflag[2] == 0 || iflag[2] == 1)
555 setGraphicObjectProperty(psubwinUID, __GO_X_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
556 setGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
557 setGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
559 setGraphicObjectProperty(psubwinUID, __GO_BOX_TYPE__, &box, jni_int, 1);
562 getGraphicObjectProperty(psubwinUID, __GO_X_AXIS_LABEL__, jni_string, (void **)&labelId);
563 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
564 getGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_LABEL__, jni_string, (void **)&labelId);
565 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
566 getGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_LABEL__, jni_string, (void **)&labelId);
567 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
569 /*else no changes : the axes visible properties are driven by the previous plot */
571 else if (iflag[2] == 2)
576 /* for 2d use only (when switching to 2d mode) */
577 setGraphicObjectProperty(psubwinUID, __GO_BOX_TYPE__, &box, jni_int, 1);
580 setGraphicObjectProperty(psubwinUID, __GO_X_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
581 setGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
582 setGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
585 getGraphicObjectProperty(psubwinUID, __GO_X_AXIS_LABEL__, jni_string, (void **)&labelId);
586 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
587 getGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_LABEL__, jni_string, (void **)&labelId);
588 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
589 getGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_LABEL__, jni_string, (void **)&labelId);
590 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
592 else if (iflag[2] == 3)
597 /* for 2d use only (when switching to 2d mode) */
598 setGraphicObjectProperty(psubwinUID, __GO_BOX_TYPE__, &box, jni_int, 1);
601 setGraphicObjectProperty(psubwinUID, __GO_X_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
602 setGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
603 setGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
606 getGraphicObjectProperty(psubwinUID, __GO_X_AXIS_LABEL__, jni_string, (void **)&labelId);
607 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
608 getGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_LABEL__, jni_string, (void **)&labelId);
609 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
610 getGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_LABEL__, jni_string, (void **)&labelId);
611 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
613 else if (iflag[2] == 4)
617 setGraphicObjectProperty(psubwinUID, __GO_BOX_TYPE__, &box, jni_int, 1);
620 setGraphicObjectProperty(psubwinUID, __GO_X_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
621 setGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
622 setGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_VISIBLE__, &axisVisible, jni_bool, 1);
625 getGraphicObjectProperty(psubwinUID, __GO_X_AXIS_LABEL__, jni_string, (void **)&labelId);
626 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
627 getGraphicObjectProperty(psubwinUID, __GO_Y_AXIS_LABEL__, jni_string, (void **)&labelId);
628 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
629 getGraphicObjectProperty(psubwinUID, __GO_Z_AXIS_LABEL__, jni_string, (void **)&labelId);
630 setGraphicObjectProperty(labelId, __GO_VISIBLE__, &labelVisible, jni_bool, 1);
634 rotationAngles[0] = *alpha;
635 rotationAngles[1] = *theta;
637 setGraphicObjectProperty(psubwinUID, __GO_ROTATION_ANGLES__, rotationAngles, jni_double_vector, 2);
639 getGraphicObjectProperty(psubwinUID, __GO_DATA_BOUNDS__, jni_double_vector, (void **)&dataBounds);
641 getGraphicObjectProperty(psubwinUID, __GO_AUTO_SCALE__, jni_bool, (void **)&piAutoScale);
645 /* compute and merge new specified bounds with data bounds */
648 case 0: /* do not change data bounds */
653 case 7 : /* Force data bounds=ebox */
654 drect[0] = ebox[0]; /*xmin*/
655 drect[2] = ebox[2]; /*ymin*/
656 drect[1] = ebox[1]; /*xmax*/
657 drect[3] = ebox[3]; /*ymax*/
658 drect[4] = ebox[4]; /*zmin*/
659 drect[5] = ebox[5]; /*zmax*/
664 case 8:/* Force data bounds to the x and y bounds */
665 getDrect(x, (*m1) * (*n1), &drect[0], &drect[1], dataBounds[0], dataBounds[1]);
666 getDrect(y, (*m2) * (*n2), &drect[2], &drect[3], dataBounds[2], dataBounds[3]);
667 getDrect(z, (*m3) * (*n3), &drect[4], &drect[5], dataBounds[4], dataBounds[5]);
671 /* merge data bounds and drect */
674 drect[0] = Min(dataBounds[0], drect[0]); /* xmin */
675 drect[1] = Max(dataBounds[1], drect[1]); /* xmax */
676 drect[2] = Min(dataBounds[2], drect[2]); /* ymin */
677 drect[3] = Max(dataBounds[3], drect[3]); /* ymax */
678 drect[4] = Min(dataBounds[4], drect[4]); /* zmin */
679 drect[5] = Max(dataBounds[5], drect[5]); /* zmax */
684 setGraphicObjectProperty(psubwinUID, __GO_DATA_BOUNDS__, drect, jni_double_vector, 6);
690 isoview = ( iflag[1] == 3 || iflag[1] == 4 || iflag[1] == 5 || iflag[1] == 6);
692 setGraphicObjectProperty(psubwinUID, __GO_ISOVIEW__, &isoview, jni_bool, 1);
695 /* =================================================
696 * Analyze arguments to find entity type
697 * ================================================= */
703 if (strcmp(fname, "plot3d1") == 0)
705 typeof3d = SCI_FAC3D;
710 typeof3d = SCI_FAC3D;
714 else if (*izcol == 2)
716 typeof3d = SCI_FAC3D;
721 typeof3d = SCI_FAC3D;
725 else if (*isfac == 0)
727 if (strcmp(fname, "plot3d1") == 0)
729 typeof3d = SCI_PLOT3D;
734 typeof3d = SCI_PLOT3D;
740 typeof3d = SCI_PARAM3D1;
744 /* =================================================
745 * Construct the Entities
746 * ================================================= */
748 /*Distinction here between SCI_PARAM3D1 and others*/
749 if ( typeof3d != SCI_PARAM3D1 )
753 /* x is considered as a matrix */
756 else if ( *m1 == 1 ) /* x is a row vector */
760 else if ( *n1 == 1 ) /* x is a column vector */
764 else /* x is a matrix */
771 int monotony = checkMonotony( x, dimvectx );
774 Scierror(999, _("%s: x vector is not monotonous.\n"), "Objplot3d");
783 /* y is considered as a matrix */
786 else if ( *m2 == 1 ) /* y is a row vector */
790 else if ( *n2 == 1 ) /* y is a column vector */
794 else /* y is a matrix */
801 /* test the monotony on y*/
802 int monotony = checkMonotony( y, dimvecty );
805 Scierror(999, _("%s: y vector is not monotonous.\n"), "Objplot3d");
812 pNewSurfaceUID = ConstructSurface( psubwinUID, typeof3d,
813 x, y, z, zcol, *izcol, *m, *n, iflag, ebox, flagcolor,
814 isfac, m1, n1, m2, n2, m3, n3, m3n, n3n);
816 if ( pNewSurfaceUID == NULL )
818 Scierror(999, _("%s: No more memory.\n"), "Objplot3d");
822 setCurrentObject( pNewSurfaceUID );
824 /* Force clipping, 1: CLIPGRF */
826 setGraphicObjectProperty(pNewSurfaceUID, __GO_CLIP_STATE__, &clipState, jni_int, 1);
828 releaseGraphicObjectProperty(__GO_PARENT__, pNewSurfaceUID, jni_string, 1);
832 char* pNewPolylineUID = NULL;
833 char* currentSubwinUID = NULL;
835 if ((hdltab = MALLOC (*n * sizeof (long))) == NULL)
837 Scierror(999, "%s: No more memory.\n", fname);
841 currentSubwinUID = (char*)getCurrentSubWin();
843 for (i = 0; i < *n; ++i)
845 /* F.Leray Pb here: In fact we do not create a Surface but one or several 3D Polylines
846 Pb comes when wanting to access the fields "surface_color" or "flag" for example
847 in function sciSet (cf. matdes.c).
848 Question 1: Are these properties accessible from a SCI_PARAM3D1 ?
849 Question 2: Is "flag" obsolete and replaced by "color_mode"?*/
851 if ((*n > 0) && (zcol != (double *)NULL))
853 if ((int) zcol[i] > 0)
855 int intzcol = (int) zcol[i];
856 pNewPolylineUID = ConstructPolyline
858 &(x[*m * i]), &(y[*m * i]), &(z[*m * i]), 0, *m, 1,
859 &intzcol, NULL, NULL, NULL, NULL, TRUE, FALSE, FALSE, FALSE);
863 int intzcol = (int) - zcol[i];
864 pNewPolylineUID = ConstructPolyline
866 &(x[*m * i]), &(y[*m * i]), &(z[*m * i]), 0, *m, 1,
867 NULL, NULL, &intzcol, NULL, NULL, FALSE, FALSE, TRUE, FALSE);
872 /* default case, nothing is given */
874 int *piCurColor = &curcolor;
876 getGraphicObjectProperty(currentSubwinUID, __GO_LINE_COLOR__, jni_int, (void**)&piCurColor);
878 pNewPolylineUID = ConstructPolyline(currentSubwinUID,
879 &(x[*m * i]), &(y[*m * i]), &(z[*m * i]), 0, *m, 1,
880 &curcolor, NULL, NULL, NULL, NULL, TRUE, FALSE, FALSE, FALSE);
883 if (pNewPolylineUID == NULL)
885 Scierror(999, _("%s: No more memory.\n"), fname);
890 setCurrentObject(pNewPolylineUID);
891 setGraphicObjectRelationship(currentSubwinUID, pNewPolylineUID);
892 releaseGraphicObjectProperty(__GO_PARENT__, pNewPolylineUID, jni_string, 1);
893 pNewPolylineUID = NULL;
895 pobjUID = (char*)getCurrentObject();
897 /* Force clipping, 1: CLIPGRF */
899 setGraphicObjectProperty(pobjUID, __GO_CLIP_STATE__, &clipState, jni_int, 1);
901 hdltab[i] = getHandle(pobjUID);
904 /** construct Compound and make it current object**/
907 char* o = ConstructCompound (hdltab, *n);
909 releaseGraphicObjectProperty(__GO_PARENT__, o, jni_string, 1);
914 /* =================================================
916 * ================================================= */
918 // subwin has been modified
921 setGraphicObjectProperty(psubwinUID, __GO_FIRST_PLOT__, &firstPlot, jni_bool, 1);
927 /*-----------------------------------------------------------
929 *-----------------------------------------------------------*/
931 void Objdrawaxis ( char dir ,
947 char* pobjUID = NULL;
948 char* psubwinUID = NULL;
950 psubwinUID = (char*)getCurrentSubWin();
954 pobjUID = ConstructAxis(
956 dir, tics, x, *nx, y, *ny, val, subint, format, font, textcol, ticscol, flag, seg, nb_tics_labels);
960 Scierror(999, _("%s: No more memory.\n"), "Objdrawaxis");
964 setCurrentObject(pobjUID);
965 releaseGraphicObjectProperty(__GO_PARENT__, pobjUID, jni_string, 1);
968 /*-----------------------------------------------------------
970 *-----------------------------------------------------------*/
972 void Objnumb( char * fname ,
973 unsigned long fname_len,
981 /*** faire une macro scilab sur xstring ****/
986 /*------------------------------------------------
988 *-----------------------------------------------*/
989 void Objfec ( double x[] ,
1005 C2F(fec)(x, y, noeud, fun, n, m, strflag, legend, brect, aaint,
1006 Zminmax, Colminmax, ColOut, WithMesh, flagNax, 4L, bsiz);
1008 /*------------------------------------------------------------------------*/
1009 static void getDrect(const double vector[], int nbElements,
1010 double * dMin, double * dMax,
1011 double defaultMin, double defaultMax)
1013 if (containsOneFiniteElement(vector, nbElements))
1015 *dMin = Mini(vector, nbElements);
1016 *dMax = Maxi(vector, nbElements);
1024 /*------------------------------------------------------------------------*/