drawSurfaceEntity.c

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------*/
00002 /* file: drawSurfaceEntity.h                                              */
00003 /* Copyright INRIA 2006                                                   */
00004 /* Authors : Jean-Baptiste Silvy                                          */
00005 /* desc : Contains functions needed to draw a surface handle              */
00006 /*------------------------------------------------------------------------*/
00007 
00008 #include "drawSurfaceEntity.h"
00009 #include "GetProperty.h"
00010 #include "periScreen.h"
00011 #include "Xcall1.h"
00012 #include "Plo3dn.h"
00013 
00014 /*--------------------------------------------------------------------------------------*/
00015 int drawSurfaceEntity( sciPointObj * pObj )
00016 {
00017   sciSurface  * ppSurface = pSURFACE_FEATURE(pObj) ;
00018   sciPointObj * parentSubWin = sciGetParentSubwin(pObj) ;
00019   int lineWidth = sciGetLineWidth( pObj ) ;
00020   int lineStyle = sciGetLineStyle( pObj ) ;
00021   int markStyle = sciGetMarkStyle( pObj ) ;
00022   int DPI[2] ;
00023 
00024   if ( pSUBWIN_FEATURE(parentSubWin)->facetmerge ) { return 0 ; }  
00025   if (!sciGetVisibility(pObj)) { return 0 ; }
00026     
00027   GetDPIFromDriver(DPI) ;
00028   
00029 #ifdef _MSC_VER
00030   flag_DO = MaybeSetWinhdc();
00031 #endif
00032   C2F (dr) ("xset", "thickness",  &lineWidth, PI0, PI0, PI0, PI0, PI0, PD0, PD0, PD0, PD0, 4L, 9L);
00033   C2F (dr) ("xset", "line style", &lineStyle, PI0, PI0, PI0, PI0, PI0, PD0, PD0, PD0, PD0, 4L, 10L); /*D.A 17/12/2003*/
00034   C2F (dr) ("xset", "mark", &markStyle, &lineWidth, PI0, PI0, PI0, PI0, PD0, PD0, PD0, PD0, 4L, 4L);
00035 #ifdef _MSC_VER
00036   if ( flag_DO == 1) { ReleaseWinHdc() ; }
00037 #endif
00038 
00039 #ifdef _MSC_VER
00040   flag_DO = MaybeSetWinhdc();
00041 #endif
00042   switch(ppSurface->typeof3d)
00043   {
00044   case SCI_FAC3D:
00045     C2F(fac3dn)(pObj,ppSurface->pvecx,ppSurface->pvecy,
00046       ppSurface->pvecz,
00047       ppSurface->color,
00048       &ppSurface->dimzx,&ppSurface->dimzy, DPI);
00049 
00050     break;
00051   case SCI_PLOT3D:
00052     C2F(plot3dn)(pObj,ppSurface->pvecx,ppSurface->pvecy,
00053       ppSurface->pvecz,
00054       &ppSurface->dimzx,&ppSurface->dimzy, DPI);
00055     break;
00056   default:
00057     break;
00058   }
00059 #ifdef _MSC_VER
00060   if ( flag_DO == 1) { ReleaseWinHdc() ; }
00061 #endif
00062 
00063   return 0 ;
00064 
00065 }
00066 /*--------------------------------------------------------------------------------------*/

Generated on Sun Mar 4 15:03:52 2007 for Scilab [trunk] by  doxygen 1.5.1