#include "ObjectStructure.h"Include dependency graph for drawSubWinEntity.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Functions | |
| int | drawSubWinEntity (sciPointObj *pObj) |
| int drawSubWinEntity | ( | sciPointObj * | pObj | ) |
Routine which draw a subwindow object
| pObj | the pointer on the subwindow object |
Definition at line 20 of file drawSubWinEntity.c.
References sciSubWindow::alpha, sciSubWindow::ARect, sciSubWindow::axes, axis_3ddraw(), axis_draw2(), C2F, dr(), DrawAxesBackground(), drawAxesGrid(), sciSubWindow::facetmerge, AXES::flag, sciSubWindow::FRect, sciSubWindow::isoview, isZoom3dOn(), L, labels2D_draw(), sciSubWindow::logflags, MaybeSetWinhdc(), NULL, PD0, PI0, tagSons::pointobj, tagSons::pprev, pSUBWIN_FEATURE, rebuild_strflag(), ReleaseWinHdc(), SCI_SEGS, sci_update_frame_bounds_2d(), sciClip(), sciDrawObj(), sciGetEntityType(), sciGetForeground(), sciGetIs3d(), sciGetLastSons(), sciGetLineWidth(), sciGetMarkStyle(), sciGetMerge(), sciGetVisibility(), sciIsMergeable(), sciSetSelectedSubWin(), sciUnClip(), sciUpdateScaleAngles(), set_scale(), sciSubWindow::theta, triedre(), v, wininfo(), and sciSubWindow::WRect.
Referenced by sciDrawObj().
00021 { 00022 sciSubWindow * ppsubwin = pSUBWIN_FEATURE(pObj) ; 00023 00024 if ( !sciGetVisibility(pObj) ) { return 0 ; } 00025 00026 sciSetSelectedSubWin(pObj); 00027 00028 set_scale("tttftt", ppsubwin->WRect, ppsubwin->FRect, 00029 NULL, ppsubwin->logflags, 00030 ppsubwin->ARect); 00031 00032 if ( sciGetIs3d(pObj) ) 00033 { 00034 int isoflag = 0 ; 00035 int axesFlag = ppsubwin->axes.flag[1] ; 00036 double xbox[8] ; 00037 double ybox[8] ; 00038 double zbox[8] ; 00039 int InsideU[4] ; 00040 int InsideD[4] ; 00041 sciSons * curSon = NULL ; 00042 00043 /* to avoid re-drawing on screen during computation of the vertices (at least)... */ 00044 /* see zoom_box function in Plo2dEch.c*/ 00045 if ( isZoom3dOn() ) 00046 { 00047 int one = 1 ; 00048 C2F(dr)("xset","pixmap",&one,PI0,PI0,PI0,PI0,PI0,PD0, 00049 PD0,PD0,PD0,0L,0L); 00050 C2F (dr) ("xset","wwpc", PI0, PI0, PI0, PI0, PI0, PI0, PD0, PD0, PD0, PD0,0L, 0L); 00051 } 00052 00053 /* 3D Coordinates */ /* verifier si c'est encore utile SS */ 00054 /*To have directly all the possible ISOVIEW Modes*/ 00055 isoflag = ( axesFlag + 1 ) / 2 ; 00056 00057 if( ppsubwin->isoview ) 00058 { 00059 if( isoflag != 2 && isoflag != 3 ) 00060 { 00061 if( axesFlag == 0 || axesFlag == 2 ) 00062 { 00063 /* The default isoview mode is type=4 3d isometric bounds 00064 derived from the data, to similarily type=2 */ 00065 ppsubwin->axes.flag[1] = 4 ; 00066 } 00067 else if ( axesFlag == 1 ) 00068 { 00069 ppsubwin->axes.flag[1] = 3 ; 00070 } 00071 } 00072 } 00073 else { 00074 if ( axesFlag == 3 || axesFlag == 5 ) 00075 { 00076 ppsubwin->axes.flag[1] = 1; /* computed from ebox*/ 00077 } 00078 else if( axesFlag == 4 || axesFlag == 6 ) 00079 { 00080 /* The default NON-isoview mode is 2 computed from data*/ 00081 ppsubwin->axes.flag[1] = 2 ; 00082 } 00083 } 00084 00085 axis_3ddraw( pObj,xbox,ybox,zbox,InsideU,InsideD); /* TEST on sciGetVisibility inside : REMOVED F.Leray 21.01.05 */ 00086 /* because axis_3ddraw displays 3d axes BUT ALSO compute + reset the 3d scale BEFORE !! */ 00087 00088 /* merge object is drawn first since it might conceal other objects */ 00089 /* which are not merged. */ 00090 if ( ppsubwin->facetmerge ) 00091 { 00092 sciDrawObj( sciGetMerge( pObj ) ) ; 00093 } 00094 00095 curSon = sciGetLastSons (pObj); 00096 while ( curSon != NULL) 00097 { 00098 if ( !(ppsubwin->facetmerge && sciIsMergeable(curSon->pointobj)) ) 00099 { 00100 sciDrawObj( curSon->pointobj ) ; 00101 } 00102 curSon = curSon->pprev; 00103 } 00104 00105 triedre(pObj,xbox,ybox,zbox,InsideU,InsideD); 00106 } 00107 else /* we are in 2D mode...*/ 00108 { 00109 sciSons * curSon = NULL ; 00110 int foreground = sciGetForeground( pObj ) ; 00111 int lineWidth = sciGetLineWidth( pObj ) ; 00112 int markStyle = sciGetMarkStyle( pObj ) ; 00113 int markSize = sciGetLineWidth( pObj ) ; 00114 int v = 0 ; 00115 double dv = 0.0 ; 00116 char strFlag[4]; 00117 00118 #ifdef _MSC_VER 00119 flag_DO=MaybeSetWinhdc(); 00120 #endif 00121 C2F (dr) ("xset","dashes",&foreground,&foreground,&v,&v,&v,&v,&dv,&dv,&dv,&dv,5L,4096); 00122 C2F (dr) ("xset","foreground",&foreground,&foreground,&v,&v,&v,&v,&dv,&dv,&dv,&dv,5L,4096); 00123 C2F (dr) ("xset","thickness",&lineWidth,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00124 C2F (dr) ("xset","mark",&markStyle,&markSize,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00125 00126 sciUpdateScaleAngles( ppsubwin->theta, ppsubwin->alpha ) ; /* for merge objects */ 00127 sci_update_frame_bounds_2d(pObj); 00128 00129 00130 /* Clipping only exists in 2d */ 00131 /* the global var. Cscale has just been updated */ 00132 /* therefore I can re-compute the clipping now (if it is "clipgrf") */ 00133 00134 sciClip( pObj ) ; /* to update the clip_box if needed */ 00135 sciUnClip( pObj ) ; 00136 00137 DrawAxesBackground(); 00138 00139 drawAxesGrid( pObj ) ; 00140 00141 /* there is a bug here */ 00142 /* We should make a check for merge objects here */ 00143 /* But merge object has been only created only for 3d */ 00144 /* so sometimes it works, sometime not */ 00145 curSon = sciGetLastSons( pObj ) ; 00146 while ( curSon != NULL ) 00147 { 00148 if ( !(ppsubwin->facetmerge && sciGetEntityType(curSon->pointobj) == SCI_SEGS) ) 00149 { 00150 sciDrawObj( curSon->pointobj ) ; 00151 } 00152 00153 curSon = curSon->pprev; 00154 } 00155 00156 /* F.Leray 07.12.04 */ 00157 /* TO CORRECT the bug 1115 : Big object (grayplots) could cover axes*/ 00158 C2F (dr) ("xset","dashes",&foreground,&foreground,&v,&v,&v,&v,&dv,&dv,&dv,&dv,5L,4096); 00159 C2F (dr) ("xset","foreground",&foreground,&foreground,&v,&v,&v,&v,&dv,&dv,&dv,&dv,5L,4096); 00160 C2F (dr) ("xset","thickness",&lineWidth,PI0,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00161 C2F (dr) ("xset","mark",&markStyle,&markSize,PI0,PI0,PI0,PI0,PD0,PD0,PD0,PD0,0L,0L); 00162 00163 rebuild_strflag( pObj, strFlag ) ; 00164 axis_draw2( strFlag ) ; 00165 00166 labels2D_draw( pObj ) ; /* F.Leray 08.08.05 : labels' drawing at the end */ 00167 00168 #ifdef _MSC_VER 00169 if ( flag_DO == 1) { ReleaseWinHdc() ; } 00170 #endif 00171 wininfo("") ; 00172 } 00173 return 0 ; 00174 }
Here is the call graph for this function:

Here is the caller graph for this function:

1.5.1