00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "ObjectStructure.h"
00014 #include "HandleManagement.h"
00015
00016
00017 #ifndef __SCI_DRAWINGS__
00018 #define __SCI_DRAWINGS__
00019
00020 #define spINSIDE_SPARSE
00021 #include "../../sparse/includes/spConfig.h"
00022
00023
00024 #include "bcg.h"
00025 #include "PloEch.h"
00026 #include "Vect2Matrix.h"
00027 #include "StringMatrix.h"
00028
00029 void wininfo __PARAMS((char *fmt,...));
00030
00031 int get_cf_type( void ) ;
00032
00033 extern void GPopupResize (struct BCG * ScilabXgc,int * width,int * height);
00034
00035
00036 void set_cf_type( int val ) ;
00037
00038
00039
00040 char ** FreeUserLabels(char ** u_xlabels, int *u_nxgrads);
00041 double * AllocUserGrads(double * u_xgrads, int nb);
00042 int CopyUserGrads(double *u_xgrad_SRC, double *u_xgrad_DEST, int dim);
00043 char ** AllocAndSetUserLabelsFromMdl(char ** u_xlabels, char ** u_xlabels_MDL, int u_nxgrads);
00044
00045
00046 extern int cf_type ;
00047
00048
00049
00050
00051 #ifdef _MSC_VER
00052 extern HFONT sciCreateFont (HDC hdc, char *szFaceName, int iDeciPtHeight, int iDeciPtWidth, int iAttributes, BOOL fLogRes);
00053
00054 #endif
00055
00056 extern void sciRedrawFigure(void);
00057 extern void sciRedrawF(int *num);
00058 extern void sciXbasc(void);
00059 extern void sciXclear(void);
00060
00061
00062 extern void SetEch3d1(double *xbox, double *ybox, double *zbox, double *bbox, double *teta, double *alpha, integer flag);
00063 extern void Convex_Box(double *xbox, double *ybox, integer *InsideU, integer *InsideD, char *legend, integer *flag, double *bbox);
00064
00065 extern void Nextind(integer ind1, integer *ind2, integer *ind3);
00066 extern int GradLog(double _min, double _max, double *_grads, int * n_grads, int compNgrads );
00067 extern BOOL Ishidden(sciPointObj *pobj);
00068 extern BOOL IsDownAxes(sciPointObj *pobj);
00069 extern void sciGetDisplayedBounds( sciPointObj * pSubWin,
00070 double * xmin ,
00071 double * xmax ,
00072 double * ymin ,
00073 double * ymax ,
00074 double * zmin ,
00075 double * zmax ) ;
00076 extern void updateScale3d( sciPointObj * pobj ,
00077 double dbox[6] ,
00078 double xbox[8] ,
00079 double ybox[8] ,
00080 double zbox[8] );
00081 extern BOOL sci_update_frame_bounds_3d(sciPointObj *pobj);
00082 extern BOOL sci_update_frame_bounds_2d(sciPointObj *pobj);
00083
00084 extern int ComputeNbSubTics(sciPointObj * pobj, int nbtics, char logflag, double * grads, int nbsubtics_input);
00085 extern int ComputeNbSubTicsFor3dUse(sciPointObj * pobj, int nbtics, char logflag, double * grads, int nbsubtics_input);
00086 extern int ComputeCorrectXindAndInsideUD(double Teta,double Alpha, double * dbox, integer *xind, integer *InsideU, integer *InsideD);
00087 extern int Axes3dStrings2(integer *ixbox, integer *iybox, integer *xind);
00088 extern int AdaptGraduationsOnZ(int x, int y, int size, integer *Ticsdir, int *fontid, sciPointObj * psubwin, double zminval, double zmaxval, double fx, double fy, double fz);
00089 extern int AdaptGraduationsOnXBottomRight(int iof, int x, int y, int size, integer *Ticsdir, int *fontid, sciPointObj * psubwin, double xminval, double xmaxval, double fx, double fy, double fz);
00090 extern int AdaptGraduationsOnYBottomRight(int iof, int x, int y, int size, integer *Ticsdir, int *fontid, sciPointObj * psubwin, double yminval, double ymaxval, double fx, double fy, double fz);
00091 extern int AdaptGraduationsOnXBottomLeft(int iof, int x, int y, int size, integer *Ticsdir, int *fontid, sciPointObj * psubwin, double xminval, double xmaxval, double fx, double fy, double fz);
00092 extern int AdaptGraduationsOnYBottomLeft(int iof, int x, int y, int size, integer *Ticsdir, int *fontid, sciPointObj * psubwin, double yminval, double ymaxval, double fx, double fy, double fz);
00093
00094 extern int CheckDisplay(double fact_h, double fact_w, char logflag, char *foo,int *posi,int *fontid,int *old_rect);
00095
00096 extern int IsInsideRectangle(int * rect, int *point);
00097
00098 extern int ComputeGoodTrans3d( sciPointObj * psubwin, int n, int *xm, int *ym, double * fx, double *fy, double *fz);
00099 extern void DrawAxesIfRequired(sciPointObj*);
00100 extern void DrawAxes(sciPointObj*);
00101
00102 extern void UpdateSubwinScale(sciPointObj * pobj);
00103
00104 extern int sciDrawObj (sciPointObj * pobj);
00105 extern int sciDrawObjIfRequired (sciPointObj * pobj);
00106 extern int sciRefreshObj( sciPointObj * pobj ) ;
00107
00108
00109 extern int ComputeXIntervals(sciPointObj *pobj, char xy_type, double **vector, int * N, int checkdim);
00110
00111
00112
00113
00116 extern int Gen3DPoints (integer type,integer *polyx,integer *polyy,integer *fill,integer whiteid,double zmin,double zmax,double *,double *,double *,integer i,integer j,integer jj1,integer *p,integer dc,integer fg, sciPointObj *psurface);
00117 extern void Merge3d(sciPointObj *psubwin);
00118 extern void Merge3dBuildTable(sciPointObj *pparent, int *index_in_entity, long *from_entity, int *pos);
00119 extern int Merge3dDimension(sciPointObj *pparent);
00120
00121 extern int CheckPixelStatus(void);
00122
00123 extern int GetDPIFromDriver(int * DPI);
00124 extern int ChooseFormatForOneGrad(char *c_format, double *grad);
00125 extern int ChildrenCounter(sciPointObj *pparent);
00126 extern int GetBarNumber(sciPointObj * pobj);
00127 extern double FindWidth(sciPointObj * pobj, int n1, int bar_number, double *x);
00128
00129 extern void sciGetAxisBox( double limits[6], double xbox[8], double ybox[8], double zbox[8] ) ;
00130 extern void sciUpdateScaleAngles( double theta, double alpha ) ;
00131 extern void sciAxesVerticesIndices( integer insideU[4],
00132 integer insideD[4],
00133 double xbox[8] ,
00134 double ybox[8] ,
00135 integer xind[8] ) ;
00136
00137 extern void matrixLine2String( char ** matrix, int matrixSize[2], int numLine, char * dest ) ;
00138
00139
00140 void computeLabelAutoPos( sciPointObj * pLabel, int axisStart[2], int axisEnd[2], int offsets[2] ) ;
00141
00142 void sciDrawFigure( int numFigure ) ;
00143
00144
00145 extern int computeRealArrowSize( sciPointObj * pSegs,
00146 int nbSegs ,
00147 int xCoord[] ,
00148 int yCoord[] ) ;
00149
00150 #endif