#include <math.h>#include <stdio.h>#include <string.h>#include "SetProperty.h"#include "GetProperty.h"#include "DrawObjects.h"#include "BuildObjects.h"#include "InitObjects.h"#include "BasicAlgos.h"#include "math_graphics.h"#include "PloEch.h"#include "Axes.h"#include "Xcall1.h"#include "sciprint.h"#include "Fec.h"#include "GrayPlot.h"#include "CurrentObjectsManagement.h"#include "MALLOC.h"#include "sciCall.h"Include dependency graph for sciCall.c:

Go to the source code of this file.
Functions | |
| BOOL | update_specification_bounds (sciPointObj *psubwin, double *rect, int flag) |
| int | plot2dn (integer ptype, char *logflags, double *x, double *y, integer *n1, integer *n2, integer *style, char *strflag, char *legend, double *brect, integer *aaint, BOOL flagNax, integer lstr1, integer lstr2) |
| void | Objrect (double *x, double *y, double *width, double *height, int *foreground, int *background, BOOL isfilled, BOOL isline, int n, long *hdl, BOOL flagstring) |
| void | Objarc (int *angle1, int *angle2, double *x, double *y, double *width, double *height, int *foreground, int *background, BOOL isfilled, BOOL isline, long *hdl) |
| void | Objpoly (double *x, double *y, integer n, integer closed, int mark, long *hdl) |
| void | Objfpoly (double *x, double *y, integer n, integer *style, long *hdl, integer shading) |
| void | Objsegs (integer *style, integer flag, integer n1, double *x, double *y, double arsize) |
| void | Objstring (char **fname, int nbRow, int nbCol, double x, double y, double *angle, double box[4], BOOL autoSize, double userSize[2], long *hdl, BOOL centerPos, int *foreground, int *background, BOOL isboxed, BOOL isline, BOOL isfilled, sciTextAlignment alignment) |
| void | Objtitle (char *str, int n, long *hdl) |
| void | Objplot2d (int ptype, char logflags[], double x[], double y[], integer *n1, integer *n2, integer style[], char strflag[], char legend[], double brect[], integer aaint[], BOOL flagNax) |
| void | Objgrayplot (double x[], double y[], double z[], integer *n1, integer *n2, char strflag[], double brect[], integer aaint[], BOOL flagNax) |
| void | Objmatplot (double z[], integer *n1, integer *n2, char strflag[], double brect[], integer aaint[], BOOL flagNax) |
| void | Objmatplot1 (double z[], integer *n1, integer *n2, double xrect[]) |
| void | Objplot3d (char *fname, integer *isfac, integer *izcol, double x[], double y[], double z[], double *zcol, integer *m, integer *n, double *theta, double *alpha, char *legend, integer *iflag, double *ebox, integer *m1, integer *n1, integer *m2, integer *n2, integer *m3, integer *n3, integer *m3n, integer *n3n) |
| void | Objdrawaxis (char dir, char tics, double *x, int *nx, double *y, int *ny, char *val[], int subint, char *format, int font, int textcol, int ticscol, char flag, int seg, int nb_tics_labels) |
| void | Objnumb (char *fname, unsigned long fname_len, integer n, integer flag, double x, double y, double *angle, double *box) |
| void | Objfec (double x[], double y[], double noeud[], double *fun, integer *n, integer *m, char strflag[], char legend[], double brect[], integer aaint[], double Zminmax[], integer Colminmax[], integer ColOut[], BOOL WithMesh, BOOL flagNax) |
| void Objarc | ( | int * | angle1, | |
| int * | angle2, | |||
| double * | x, | |||
| double * | y, | |||
| double * | width, | |||
| double * | height, | |||
| int * | foreground, | |||
| int * | background, | |||
| BOOL | isfilled, | |||
| BOOL | isline, | |||
| long * | hdl | |||
| ) |
Definition at line 86 of file sciCall.c.
References checkRedrawing(), ConstructArc(), FALSE, sciDrawObjIfRequired(), sciGetCurrentFigure(), sciGetCurrentObj(), sciGetCurrentSubWin(), sciGetHandle(), and sciSetCurrentObj().
Referenced by sci_xarc(), sci_xarcs(), and sci_xfarcs().
00097 { 00098 BOOL redraw = FALSE ; 00099 sciPointObj *psubwin, *pobj; 00100 psubwin = sciGetCurrentSubWin() ; 00101 00102 redraw = checkRedrawing() ; 00103 00104 sciSetCurrentObj (ConstructArc 00105 (psubwin,*x,*y, 00106 *height, *width, *angle1, *angle2, foreground, background, isfilled, isline)); 00107 pobj = sciGetCurrentObj(); 00108 00109 *hdl=sciGetHandle(pobj); 00110 00111 /* if the window has been cleared we must redraw everything */ 00112 if ( redraw ) 00113 { 00114 sciDrawObjIfRequired( sciGetCurrentFigure() ) ; 00115 } 00116 else 00117 { 00118 sciDrawObjIfRequired( pobj ) ; 00119 } 00120 00121 00122 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void Objdrawaxis | ( | char | dir, | |
| char | tics, | |||
| double * | x, | |||
| int * | nx, | |||
| double * | y, | |||
| int * | ny, | |||
| char * | val[], | |||
| int | subint, | |||
| char * | format, | |||
| int | font, | |||
| int | textcol, | |||
| int | ticscol, | |||
| char | flag, | |||
| int | seg, | |||
| int | nb_tics_labels | |||
| ) |
Definition at line 794 of file sciCall.c.
References checkRedrawing(), ConstructAxes(), FALSE, sciDrawObjIfRequired(), sciGetCurrentFigure(), sciGetCurrentObj(), sciGetCurrentSubWin(), and sciSetCurrentObj().
Referenced by sci_drawaxis().
00809 { 00810 BOOL redraw = FALSE ; 00811 redraw = checkRedrawing() ; 00812 sciSetCurrentObj (ConstructAxes 00813 ((sciPointObj *) 00814 sciGetCurrentSubWin(), 00815 dir,tics,x,*nx,y,*ny,val,subint,format,font,textcol,ticscol,flag,seg,nb_tics_labels)); 00816 sciDrawObjIfRequired(sciGetCurrentObj ()); 00817 00818 if ( redraw ) 00819 { 00820 sciDrawObjIfRequired( sciGetCurrentFigure() ) ; 00821 } 00822 00823 /* F.Leray 10.03.04: In fact we use ConstructAxes AND NOT ConstructAxis to draw 00824 one axis. ConstructAxis is apparently unused!!*/ 00825 00826 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void Objfec | ( | double | x[], | |
| double | y[], | |||
| double | noeud[], | |||
| double * | fun, | |||
| integer * | n, | |||
| integer * | m, | |||
| char | strflag[], | |||
| char | legend[], | |||
| double | brect[], | |||
| integer | aaint[], | |||
| double | Zminmax[], | |||
| integer | Colminmax[], | |||
| integer | ColOut[], | |||
| BOOL | WithMesh, | |||
| BOOL | flagNax | |||
| ) |
Definition at line 849 of file sciCall.c.
References bsiz, C2F, fec(), and L.
Referenced by sci_fec().
00864 { 00865 C2F(fec)(x,y,noeud,fun,n,m,strflag,legend,brect,aaint, 00866 Zminmax,Colminmax,ColOut,WithMesh,flagNax,4L,bsiz); 00867 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 167 of file sciCall.c.
References abs, checkRedrawing(), ConstructPolyline(), FALSE, NULL, PD0, sciDrawObjIfRequired(), sciGetCurrentFigure(), sciGetCurrentObj(), sciGetCurrentSubWin(), sciGetForeground(), sciGetHandle(), sciSetCurrentObj(), and TRUE.
Referenced by sci_xfpoly(), and sci_xfpolys().
00173 { 00174 BOOL redraw = FALSE ; 00175 int fillcolor, contourcolor; 00176 sciPointObj *psubwin, *pobj; 00177 int closed = 1; /* we close the polyline by default */ 00178 psubwin = sciGetCurrentSubWin(); 00179 00180 redraw = checkRedrawing() ; 00181 00182 if(shading == 2) 00183 { 00184 /* interpolated shading is "on" */ 00185 sciSetCurrentObj (ConstructPolyline(psubwin,x,y,PD0,closed,n, 00186 1,1,NULL,style,NULL,NULL,NULL,FALSE,TRUE,FALSE,TRUE)); 00187 } 00188 else 00189 { 00190 /* flat mode is "on" */ 00191 if (*style < 0){ 00192 fillcolor = abs(*style); 00193 sciSetCurrentObj (ConstructPolyline(psubwin,x,y,PD0,closed,n, 00194 1,1,NULL,&fillcolor,NULL,NULL,NULL,FALSE,TRUE,FALSE,FALSE)); 00195 } 00196 else if (*style == 0){ 00197 contourcolor = sciGetForeground(psubwin); 00198 sciSetCurrentObj (ConstructPolyline(psubwin,x,y,PD0,closed,n, 00199 1,1,&contourcolor,NULL,NULL,NULL,NULL,TRUE,FALSE,FALSE,FALSE)); 00200 } 00201 else{ /* *style > 0*/ 00202 fillcolor = *style; 00203 contourcolor = sciGetForeground(psubwin); 00204 sciSetCurrentObj (ConstructPolyline(psubwin,x,y,PD0,closed,n, 00205 1,1,&contourcolor,&fillcolor,NULL,NULL,NULL,TRUE,TRUE,FALSE,FALSE)); 00206 } 00207 00208 pobj = sciGetCurrentObj(); 00209 *hdl=sciGetHandle(sciGetCurrentObj ()); 00210 } 00211 00212 if ( redraw ) 00213 { 00214 sciDrawObjIfRequired( sciGetCurrentFigure() ) ; 00215 } 00216 00217 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void Objplot2d | ( | int | ptype, | |
| char | logflags[], | |||
| double | x[], | |||
| double | y[], | |||
| integer * | n1, | |||
| integer * | n2, | |||
| integer | style[], | |||
| char | strflag[], | |||
| char | legend[], | |||
| double | brect[], | |||
| integer | aaint[], | |||
| BOOL | flagNax | |||
| ) |
Definition at line 350 of file sciCall.c.
References bsiz, L, and plot2dn().
Referenced by sci_plot2d(), and sci_plot2d1_G().
00362 { 00363 plot2dn(ptype,logflags,x,y,n1,n2,style,strflag,legend,brect,aaint,flagNax,4L,bsiz); 00364 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void Objplot3d | ( | char * | fname, | |
| integer * | isfac, | |||
| integer * | izcol, | |||
| double | x[], | |||
| double | y[], | |||
| double | z[], | |||
| double * | zcol, | |||
| integer * | m, | |||
| integer * | n, | |||
| double * | theta, | |||
| double * | alpha, | |||
| char * | legend, | |||
| integer * | iflag, | |||
| double * | ebox, | |||
| integer * | m1, | |||
| integer * | n1, | |||
| integer * | m2, | |||
| integer * | n2, | |||
| integer * | m3, | |||
| integer * | n3, | |||
| integer * | m3n, | |||
| integer * | n3n | |||
| ) |
Definition at line 410 of file sciCall.c.
References BT_OFF, BT_ON, checkMonotony(), checkRedrawing(), ChildrenCounter(), ConstructCompound(), ConstructPolyline(), ConstructSurface(), FALSE, FREE, i, MALLOC, Max, Maxi(), Merge3d(), Min, Mini(), sciSubWindow::mon_x_label, sciSubWindow::mon_y_label, sciSubWindow::mon_z_label, NULL, pSUBWIN_FEATURE, pSURFACE_FEATURE, SCI_FAC3D, SCI_PARAM3D1, SCI_PLOT3D, sciDrawObj(), sciGetCurrentFigure(), sciGetCurrentObj(), sciGetCurrentSubWin(), sciGetForeground(), sciGetGraphicMode(), sciGetHandle(), sciprint(), sciSetCurrentObj(), sciSetText(), sciSetVisibility(), TRUE, and update_specification_bounds().
Referenced by sci_param3d(), sci_param3d1(), and sci_plot3d().
00432 : warning here legends means "X@Y@Z": it is labels writings!! */ 00433 /* legends has not the same meaning than inside plot2dn (there, it is really the legends of the plotted curves)*/ 00434 { 00435 sciTypeOf3D typeof3d; 00436 integer flagcolor; 00437 long *hdltab; 00438 int i, mn; 00439 BOOL needMerge = FALSE ; 00440 sciPointObj *psubwin = NULL, *pobj = NULL; 00441 double drect[6]; 00442 char * loc = NULL; 00443 char * legx = NULL; 00444 char * legy = NULL; 00445 char * legz = NULL; 00446 /* char * buff = NULL; */ 00447 int flag_x = 1; 00448 int flag_y = 1; 00449 int dimvectx = -1; 00450 int dimvecty = -1; 00451 00452 sciPointObj * pNewSurface = NULL ; 00453 sciSubWindow * ppsubwin = NULL; 00454 BOOL bounds_changed = FALSE; /* cannot be used here because we have to force redrawing since there is no way to avoid merge (=> complete redraaw) */ 00455 00456 /* Initialisation drect A.C pour debuggueur */ 00457 drect[0]=0; 00458 drect[1]=0; 00459 drect[2]=0; 00460 drect[3]=0; 00461 drect[4]=0; 00462 drect[5]=0; 00463 00464 /* ================================================= 00465 * Force SubWindow properties according to arguments 00466 * ================================================= */ 00467 00468 psubwin= sciGetCurrentSubWin(); 00469 00470 checkRedrawing() ; 00471 00472 /* Force psubwin->is3d to TRUE: we are in 3D mode */ 00473 pSUBWIN_FEATURE (psubwin)->is3d = TRUE; 00474 pSUBWIN_FEATURE (psubwin)->project[2] = 1; /* to force z axis display */ 00475 00476 ppsubwin = pSUBWIN_FEATURE(psubwin); 00477 00478 if ( legend != NULL ) 00479 { 00480 /* F.Leray 25.04.05 replace the default labels by the user labels if specified */ 00481 loc=(char *) MALLOC( (strlen(legend)+1)*sizeof(char)); 00482 if ( loc == NULL) 00483 sciprint("Objplot3d : No more Place to store all the labels\n"); 00484 00485 strcpy(loc,legend); 00486 00487 /* legx=strtok_r(loc,"@",&buff); */ 00488 legx=strtok(loc,"@"); 00489 00490 if (legx != NULL) 00491 { 00492 sciSetText( ppsubwin->mon_x_label, &legx , 1, 1 ) ; 00493 } 00494 00495 /* legy=strtok_r((char *)0,"@",&buff); */ 00496 legy=strtok((char *)NULL,"@"); /* NULL to begin at the last read character */ 00497 if ( legy != NULL ) 00498 { 00499 sciSetText( ppsubwin->mon_y_label, &legy , 1, 1 ) ; 00500 } 00501 00502 /* legz=strtok_r((char *)0,"@",&buff); */ 00503 legz=strtok((char *)NULL,"@"); 00504 if ( legz != NULL ) 00505 { 00506 sciSetText( ppsubwin->mon_z_label, &legz , 1, 1 ) ; 00507 } 00508 } 00509 00510 /* Force psubwin->logflags to linear */ 00511 pSUBWIN_FEATURE (psubwin)->logflags[0]='n'; 00512 pSUBWIN_FEATURE (psubwin)->logflags[1]='n'; 00513 pSUBWIN_FEATURE (psubwin)->logflags[2]='n'; /* add z logscale default here */ 00514 00515 00516 pSUBWIN_FEATURE (psubwin)->axes.flag[0] = iflag[0]; /* mode: treatment of hidden parts */ 00517 if (iflag[1] != 0){ 00518 if (iflag[1]<7) 00519 pSUBWIN_FEATURE (psubwin)->axes.flag[1] = iflag[1]; /* type: scaling (no more useful) */ 00520 else 00521 pSUBWIN_FEATURE (psubwin)->axes.flag[1] = iflag[1]-6; /* type: scaling (no more useful) */ 00522 } 00523 00524 if( pSUBWIN_FEATURE (psubwin)->FirstPlot == FALSE && (iflag[2] == 0 || iflag[2] == 1)) 00525 { 00526 /* Nothing to do: we leave as before */ 00527 } 00528 else 00529 { 00530 pSUBWIN_FEATURE (psubwin)->axes.flag[2] = iflag[2]; /* box: frame around the plot */ 00531 00532 if(iflag[2] == 0 || iflag[2] == 1) 00533 { 00534 00535 if (pSUBWIN_FEATURE(psubwin)->FirstPlot) 00536 { 00537 pSUBWIN_FEATURE (psubwin)->axes.axes_visible[0] = FALSE; 00538 pSUBWIN_FEATURE (psubwin)->axes.axes_visible[1] = FALSE; 00539 pSUBWIN_FEATURE (psubwin)->axes.axes_visible[2] = FALSE; 00540 pSUBWIN_FEATURE (psubwin)->axes.rect = BT_OFF ; 00541 00542 sciSetVisibility(pSUBWIN_FEATURE (psubwin)->mon_x_label,FALSE); 00543 sciSetVisibility(pSUBWIN_FEATURE (psubwin)->mon_y_label,FALSE); 00544 sciSetVisibility(pSUBWIN_FEATURE (psubwin)->mon_z_label,FALSE); 00545 } 00546 /*else no changes : the axes visible properties are driven by the previous plot */ 00547 } 00548 else if(iflag[2] == 3) 00549 { 00550 pSUBWIN_FEATURE (psubwin)->axes.rect = BT_ON ; /* for 2d use only (when switching to 2d mode) */ 00551 00552 pSUBWIN_FEATURE (psubwin)->axes.axes_visible[0] = FALSE; 00553 pSUBWIN_FEATURE (psubwin)->axes.axes_visible[1] = FALSE; 00554 pSUBWIN_FEATURE (psubwin)->axes.axes_visible[2] = FALSE; 00555 00556 sciSetVisibility(pSUBWIN_FEATURE (psubwin)->mon_x_label,TRUE); 00557 sciSetVisibility(pSUBWIN_FEATURE (psubwin)->mon_y_label,TRUE); 00558 sciSetVisibility(pSUBWIN_FEATURE (psubwin)->mon_z_label,TRUE); 00559 } 00560 else if(iflag[2] == 4) 00561 { 00562 pSUBWIN_FEATURE (psubwin)->axes.rect = BT_ON ; 00563 00564 pSUBWIN_FEATURE (psubwin)->axes.axes_visible[0] = TRUE; 00565 pSUBWIN_FEATURE (psubwin)->axes.axes_visible[1] = TRUE; 00566 pSUBWIN_FEATURE (psubwin)->axes.axes_visible[2] = TRUE; 00567 00568 sciSetVisibility(pSUBWIN_FEATURE (psubwin)->mon_x_label,TRUE); 00569 sciSetVisibility(pSUBWIN_FEATURE (psubwin)->mon_y_label,TRUE); 00570 sciSetVisibility(pSUBWIN_FEATURE (psubwin)->mon_z_label,TRUE); 00571 } 00572 } 00573 00574 pSUBWIN_FEATURE (psubwin)->alpha = *alpha; 00575 pSUBWIN_FEATURE (psubwin)->theta = *theta; 00576 00577 if ( ChildrenCounter(psubwin) > 0 ) 00578 { 00579 needMerge = TRUE ; 00580 } 00581 00582 if ((sciGetGraphicMode (psubwin)->autoscaling)) { 00583 /* compute and merge new specified bounds with psubwin->Srect */ 00584 switch (iflag[1]) { 00585 case 0: /* do not change psubwin->Srect */ 00586 break; 00587 case 1 : case 3 : case 5 : case 7 : /* Force psubwin->Srect=ebox */ 00588 drect[0] = ebox[0]; /*xmin*/ 00589 drect[2] = ebox[2]; /*ymin*/ 00590 drect[1] = ebox[1]; /*xmax*/ 00591 drect[3] = ebox[3]; /*ymax*/ 00592 drect[4] = ebox[4]; /*zmin*/ 00593 drect[5] = ebox[5]; /*zmax*/ 00594 break; 00595 case 2 : case 4 : case 6 : case 8:/* Force psubwin->Srect to the x and y bounds */ 00596 mn=(*m1) * (*n1); 00597 drect[0] = (double) Mini(x, mn); /*xmin*/ 00598 drect[1] = (double) Maxi(x, mn); /*xmax*/ 00599 mn=(*m2) * (*n2); 00600 drect[2] = (double) Mini(y, mn); /*ymin*/ 00601 drect[3] = (double) Maxi(y, mn); /*ymax*/ 00602 mn=(*m3) * (*n3); 00603 drect[4] = (double) Mini(z, mn); /*zmin*/ 00604 drect[5] = (double) Maxi(z, mn); /*zmax*/ 00605 break; 00606 } 00607 if (!pSUBWIN_FEATURE(psubwin)->FirstPlot ) { /* merge psubwin->Srect and drect */ 00608 drect[0] = Min(pSUBWIN_FEATURE(psubwin)->SRect[0],drect[0]); /*xmin*/ 00609 drect[1] = Max(pSUBWIN_FEATURE(psubwin)->SRect[1],drect[1]); /*xmax*/ 00610 drect[2] = Min(pSUBWIN_FEATURE(psubwin)->SRect[2],drect[2]); /*ymin*/ 00611 drect[3] = Max(pSUBWIN_FEATURE(psubwin)->SRect[3],drect[3]); /*ymax*/ 00612 drect[4] = Min(pSUBWIN_FEATURE(psubwin)->SRect[4],drect[4]); /*zmin*/ 00613 drect[5] = Max(pSUBWIN_FEATURE(psubwin)->SRect[5],drect[5]); /*zmax*/ 00614 } 00615 if (iflag[1] != 0) 00616 bounds_changed = update_specification_bounds(psubwin, drect,3); 00617 } 00618 00619 if(iflag[1] != 0) 00620 pSUBWIN_FEATURE(psubwin)->isoview = (BOOL)( iflag[1] == 3 || iflag[1] == 4 || 00621 iflag[1] == 5 || iflag[1] == 6); 00622 00623 /* ================================================= 00624 * Analyze arguments to find entity type 00625 * ================================================= */ 00626 00627 if (*isfac== 1) { 00628 if (*izcol == 0) { 00629 if (strcmp(fname,"plot3d1")==0) {typeof3d = SCI_FAC3D; flagcolor=1;} 00630 else {typeof3d = SCI_FAC3D; flagcolor=0;} 00631 } 00632 else if (*izcol == 2) {typeof3d = SCI_FAC3D; flagcolor=3;} 00633 else {typeof3d = SCI_FAC3D; flagcolor=2;} 00634 } 00635 else if (*isfac== 0) { 00636 if (strcmp(fname,"plot3d1")==0) {typeof3d = SCI_PLOT3D; flagcolor=1;} 00637 else {typeof3d = SCI_PLOT3D; flagcolor=0;} 00638 } 00639 else {typeof3d = SCI_PARAM3D1;flagcolor=1;} 00640 00641 00642 /* ================================================= 00643 * Construct the Entities 00644 * ================================================= */ 00645 00646 if ( typeof3d != SCI_PARAM3D1 ) {/*Distinction here between SCI_PARAM3D1 and others*/ 00647 00648 00649 if ( *isfac == 1 ) 00650 { 00651 /* x is considered as a matrix */ 00652 dimvectx = -1 ; 00653 } 00654 else if ( *m1 == 1 ) /* x is a row vector */ 00655 { 00656 dimvectx = *n1; 00657 } 00658 else if ( *n1 == 1 ) /* x is a column vector */ 00659 { 00660 dimvectx = *m1; 00661 } 00662 else /* x is a matrix */ 00663 { 00664 dimvectx = -1; 00665 } 00666 00667 if ( dimvectx > 1 ) 00668 { 00669 int monotony = checkMonotony( x, dimvectx ) ; 00670 if ( monotony == 0 ) 00671 { 00672 sciprint("Objplot3d: x vector is not monotonous \t\n."); 00673 return; 00674 } 00675 00676 flag_x = monotony ; 00677 } 00678 00679 if ( *isfac == 1 ) 00680 { 00681 /* y is considered as a matrix */ 00682 dimvecty = -1 ; 00683 } 00684 else if ( *m2 == 1 ) /* y is a row vector */ 00685 { 00686 dimvecty = *n2 ; 00687 } 00688 else if ( *n2 == 1 ) /* y is a column vector */ 00689 { 00690 dimvecty = *m2 ; 00691 } 00692 else /* y is a matrix */ 00693 { 00694 dimvecty = -1 ; 00695 } 00696 00697 if( dimvecty > 1 ) 00698 { 00699 /* test the monotony on y*/ 00700 int monotony = checkMonotony( y, dimvecty ) ; 00701 if ( monotony == 0 ) 00702 { 00703 sciprint("Objplot3d: x vector is not monotonous \t\n."); 00704 return ; 00705 } 00706 00707 flag_y = monotony ; 00708 } 00709 00710 pNewSurface = ConstructSurface( psubwin, typeof3d, 00711 x, y, z, zcol, *izcol, *m, *n, iflag,ebox,flagcolor, 00712 isfac,m1,n1,m2,n2,m3,n3,m3n,n3n) ; 00713 00714 if ( pNewSurface == NULL ) { return ; } 00715 00716 sciSetCurrentObj( pNewSurface ) ; 00717 00718 pSURFACE_FEATURE (sciGetCurrentObj())->flag_x = flag_x; 00719 pSURFACE_FEATURE (sciGetCurrentObj())->flag_y = flag_y; 00720 00721 00722 } 00723 else 00724 { 00725 if ((hdltab = MALLOC (*n * sizeof (long))) == NULL) { 00726 Scierror(999,"%s: No more memory available\r\n",fname); 00727 return; 00728 } 00729 for (i = 0; i < *n; ++i) { 00730 /* F.Leray Pb here: In fact we do not create a Surface but one or several 3D Polylines 00731 Pb comes when wanting to access the fields "surface_color" or "flag" for example 00732 in function sciSet (cf. matdes.c). 00733 Question 1: Are these properties accessible from a SCI_PARAM3D1 ? 00734 Question 2: Is "flag" obsolete and replaced by "color_mode"?*/ 00735 00736 if ((*n > 0) && (zcol != (double *)NULL)) { 00737 if ((int) zcol[i] > 0){ 00738 int intzcol = (int) zcol[i]; 00739 sciSetCurrentObj (ConstructPolyline 00740 (sciGetCurrentSubWin(), 00741 &(x[*m * i]),&(y[*m * i]),&(z[*m * i]),0,*m,*n,1, 00742 &intzcol,NULL,NULL,NULL,NULL,TRUE,FALSE,FALSE,FALSE)); 00743 } 00744 else { 00745 int intzcol = (int) -zcol[i]; 00746 sciSetCurrentObj (ConstructPolyline 00747 (sciGetCurrentSubWin(), 00748 &(x[*m * i]),&(y[*m * i]),&(z[*m * i]),0,*m,*n,1, 00749 NULL,NULL,&intzcol,NULL,NULL,FALSE,FALSE,TRUE,FALSE)); 00750 } 00751 } 00752 else { /* default case, nothing is given */ 00753 int curcolor = sciGetForeground(sciGetCurrentSubWin()); /* current color equivalent for new graphics mode */ 00754 sciSetCurrentObj (ConstructPolyline 00755 (sciGetCurrentSubWin(), 00756 &(x[*m * i]),&(y[*m * i]),&(z[*m * i]),0,*m,*n,1, 00757 &curcolor,NULL,NULL,NULL,NULL,TRUE,FALSE,FALSE,FALSE)); 00758 } 00759 00760 pobj = sciGetCurrentObj(); 00761 00762 hdltab[i]=sciGetHandle(pobj); 00763 } 00764 00765 00767 if ( *n>1 ) sciSetCurrentObj (ConstructCompound (hdltab, *n)); 00768 FREE(hdltab); 00769 } 00770 00771 /* ================================================= 00772 * Merge with previous 3D plots (build a set of facets) 00773 * ================================================= */ 00774 00775 if ( needMerge ) 00776 { 00777 Merge3d( psubwin ) ; 00778 } 00779 00780 /* ================================================= 00781 * Redraw Figure 00782 * ================================================= */ 00783 00784 sciDrawObj(sciGetCurrentFigure ()); 00785 pSUBWIN_FEATURE(psubwin)->FirstPlot=FALSE; 00786 00787 FREE(loc); loc = NULL; 00788 00789 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 128 of file sciCall.c.
References abs, checkRedrawing(), ConstructPolyline(), FALSE, NULL, PD0, sciDrawObjIfRequired(), sciGetCurrentFigure(), sciGetCurrentObj(), sciGetCurrentSubWin(), sciGetHandle(), sciSetCurrentObj(), and TRUE.
Referenced by sci_xfpolys(), sci_xpoly(), and sci_xpolys().
00134 { 00135 BOOL redraw = FALSE ; 00136 sciPointObj *psubwin, *pobj; 00137 psubwin = sciGetCurrentSubWin(); 00138 00139 redraw = checkRedrawing() ; 00140 00141 if (mark <= 0) 00142 { 00143 int absmark = abs(mark); 00144 sciSetCurrentObj (ConstructPolyline(psubwin,x,y,PD0,closed,n,1,1, 00145 NULL,NULL,&absmark,NULL,NULL,FALSE,FALSE,TRUE,FALSE)); 00146 } 00147 else 00148 { 00149 sciSetCurrentObj (ConstructPolyline(psubwin,x,y,PD0,closed,n,1,1, 00150 &mark,NULL,NULL,NULL,NULL,TRUE,FALSE,FALSE,FALSE)); 00151 } 00152 00153 pobj = sciGetCurrentObj(); 00154 *hdl=sciGetHandle(pobj); 00155 00156 if ( redraw ) 00157 { 00158 sciDrawObjIfRequired( sciGetCurrentFigure() ) ; 00159 } 00160 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void Objrect | ( | double * | x, | |
| double * | y, | |||
| double * | width, | |||
| double * | height, | |||
| int * | foreground, | |||
| int * | background, | |||
| BOOL | isfilled, | |||
| BOOL | isline, | |||
| int | n, | |||
| long * | hdl, | |||
| BOOL | flagstring | |||
| ) |
Definition at line 40 of file sciCall.c.
References checkRedrawing(), ConstructRectangle(), FALSE, NULL, sciDrawObjIfRequired(), sciGetCurrentFigure(), sciGetCurrentSubWin(), sciGetHandle(), and sciSetCurrentObj().
Referenced by sci_xrect(), and sci_xrects().
00051 { 00052 sciPointObj * newObj = NULL ; 00053 BOOL redraw = FALSE ; 00054 sciPointObj *psubwin; 00055 psubwin = sciGetCurrentSubWin(); 00056 00057 /* check if the auto_clear property is on and then erase everything */ 00058 redraw = checkRedrawing() ; 00059 00060 newObj = ConstructRectangle(psubwin ,*x,*y,*height, *width, 0, 0, 00061 foreground, background, isfilled, isline, n, flagstring) ; 00062 00063 if ( newObj == NULL ) 00064 { 00065 /* an error occured */ 00066 *hdl = -1 ; 00067 return ; 00068 } 00069 00070 sciSetCurrentObj( newObj ) ; 00071 *hdl=sciGetHandle( newObj ) ; 00072 00073 /* if the window has been cleared we must redraw everything */ 00074 if ( redraw ) 00075 { 00076 sciDrawObjIfRequired( sciGetCurrentFigure() ) ; 00077 } 00078 00079 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 223 of file sciCall.c.
References checkRedrawing(), ConstructSegs(), FALSE, n2, sciDrawObjIfRequired(), sciGetCurrentFigure(), sciGetCurrentObj(), sciGetCurrentSubWin(), sciSetCurrentObj(), and type.
Referenced by sci_xarrows(), and sci_xsegs().
00229 { 00230 BOOL redraw = FALSE ; 00231 integer type=0,n2, colored=0; 00232 double *fx,*fy,arfact=1.0; 00233 int typeofchamp = -1; /* no champ here, only segs ; this info is useless */ 00234 sciPointObj *psubwin = sciGetCurrentSubWin(); 00235 00236 redraw = checkRedrawing() ; 00237 00238 n2=n1; 00239 fx=x;fy=y; 00240 sciSetCurrentObj (ConstructSegs(psubwin,type, 00241 x,y,n1,n2,fx,fy,flag,style,arsize,colored,arfact,typeofchamp)); 00242 if ( redraw ) 00243 { 00244 sciDrawObjIfRequired( sciGetCurrentFigure() ) ; 00245 } 00246 else 00247 { 00248 sciDrawObjIfRequired(sciGetCurrentObj ()); 00249 } 00250 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void Objstring | ( | char ** | fname, | |
| int | nbRow, | |||
| int | nbCol, | |||
| double | x, | |||
| double | y, | |||
| double * | angle, | |||
| double | box[4], | |||
| BOOL | autoSize, | |||
| double | userSize[2], | |||
| long * | hdl, | |||
| BOOL | centerPos, | |||
| int * | foreground, | |||
| int * | background, | |||
| BOOL | isboxed, | |||
| BOOL | isline, | |||
| BOOL | isfilled, | |||
| sciTextAlignment | alignment | |||
| ) |
Definition at line 256 of file sciCall.c.
References C2F, checkRedrawing(), ConstructText(), dr(), echelle2d(), echelle2dl(), FALSE, L, n, sciDrawObjIfRequired(), sciGetCurrentFigure(), sciGetCurrentObj(), sciGetCurrentSubWin(), sciGetHandle(), sciGetParentSubwin(), sciSetCurrentObj(), sciSetFontOrientation(), updateScaleIfRequired(), v, XDouble2Pixel, and YDouble2Pixel.
Referenced by sci_xstring(), and sci_xstringb().
00273 { 00274 BOOL redraw = FALSE ; 00275 integer v; 00276 double dv; 00277 integer x1,yy1,n=1,rect1[4]; 00278 sciPointObj *psubwin, *pobj; 00279 00280 00281 psubwin = sciGetCurrentSubWin(); 00282 00283 redraw = checkRedrawing() ; 00284 00285 sciSetCurrentObj( ConstructText( psubwin , 00286 fname , 00287 nbRow , 00288 nbCol , 00289 x , 00290 y , 00291 autoSize , 00292 userSize , 00293 centerPos , 00294 foreground, 00295 background, 00296 isboxed , 00297 isline , 00298 isfilled , 00299 alignment ) ) ; 00300 pobj=sciGetCurrentObj (); 00301 *hdl= sciGetHandle(pobj); 00302 sciSetFontOrientation (pobj, (int) (*angle * 10)); 00303 00304 if ( redraw ) 00305 { 00306 sciDrawObjIfRequired( sciGetCurrentFigure() ) ; 00307 } 00308 else 00309 { 00310 sciDrawObjIfRequired(pobj); 00311 } 00312 00313 updateScaleIfRequired( sciGetParentSubwin( pobj ) ) ; 00314 x1 = XDouble2Pixel(x); 00315 yy1 = YDouble2Pixel(y); 00316 C2F(dr)("xstringl",fname[0],&x1,&yy1,rect1,&v,&v,&v,&dv,&dv,&dv,&dv,9L,0L); 00317 C2F(echelle2d)(box,box+1,rect1,rect1+1,&n,&n,"i2f",3L); 00318 C2F(echelle2dl)(box+2,box+3,rect1+2,rect1+3,&n,&n,"i2f"); 00319 00320 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 325 of file sciCall.c.
References checkRedrawing(), ConstructTitle(), FALSE, sciDrawObjIfRequired(), sciGetCurrentFigure(), sciGetCurrentObj(), sciGetCurrentSubWin(), sciGetHandle(), and sciSetCurrentObj().
00328 { 00329 BOOL redraw = FALSE ; 00330 redraw = checkRedrawing() ; 00331 sciSetCurrentObj (ConstructTitle 00332 (sciGetCurrentSubWin(),str,n)); 00333 00334 *hdl=sciGetHandle(sciGetCurrentObj ()); 00335 if ( redraw ) 00336 { 00337 sciDrawObjIfRequired( sciGetCurrentFigure() ) ; 00338 } 00339 else 00340 { 00341 sciDrawObjIfRequired(sciGetCurrentObj ()) ; 00342 } 00343 }
Here is the call graph for this function:

| int plot2dn | ( | integer | ptype, | |
| char * | logflags, | |||
| double * | x, | |||
| double * | y, | |||
| integer * | n1, | |||
| integer * | n2, | |||
| integer * | style, | |||
| char * | strflag, | |||
| char * | legend, | |||
| double * | brect, | |||
| integer * | aaint, | |||
| BOOL | flagNax, | |||
| integer | lstr1, | |||
| integer | lstr2 | |||
| ) |
| BOOL update_specification_bounds | ( | sciPointObj * | psubwin, | |
| double * | rect, | |||
| int | flag | |||
| ) |
1.5.1