drawLegendEntity.h File Reference

#include "ObjectStructure.h"

Include dependency graph for drawLegendEntity.h:

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

Go to the source code of this file.

Functions

int drawLegendEntity (sciPointObj *pObj)


Function Documentation

int drawLegendEntity ( sciPointObj pObj  ) 

Routine which draw a legend object

Parameters:
pObj the pointer on the legend object

Definition at line 119 of file drawLegendEntity.c.

References C2F, dr(), dr1(), getStrMatElement(), i, L, Legends(), MaybeSetWinhdc(), sciLegend::nblegends, pLEGEND_FEATURE, sciLegend::pptabofpointobj, sciLegend::pstyle, ReleaseWinHdc(), sciGetFontDeciWidth(), sciGetFontStyle(), sciGetForeground(), sciGetIsMark(), sciGetMarkStyle(), sciGetText(), sciGetVisibility(), and v.

Referenced by sciDrawObj().

00120 {
00121   sciLegend * ppLegend = pLEGEND_FEATURE(pObj) ;
00122 
00123   int verbose = 0 ;
00124   int foreground = sciGetForeground( pObj ) ;
00125   int fontWidth = sciGetFontDeciWidth( pObj ) / 100 ;
00126   int fontStyle = sciGetFontStyle( pObj ) ;
00127   int oldForeground = 0 ;
00128   int oldDashStyle = 0 ;
00129   int v = 0 ;
00130   double dv = 0.0 ;
00131   int i ;
00132 
00133   if ( !sciGetVisibility(pObj) ) { return 0 ; }
00134 
00135   C2F(dr1)("xget", "dashes", &verbose, &oldDashStyle, &v, &v, &v,&v, &dv, &dv, &dv, &dv, 5L, 4096);
00136   C2F(dr1)("xget", "foreground", &verbose, &oldForeground, &v, &v, &v, &v, &dv, &dv, &dv, &dv, 5L, 4096);
00137 
00138 
00139 #ifdef _MSC_VER 
00140   flag_DO=MaybeSetWinhdc();
00141 #endif
00142   C2F (dr1) ("xset", "dashes", &foreground, &foreground, &v, &v, &v, &v, &dv,
00143     &dv, &dv, &dv, 5L, 4096);
00144   C2F (dr1) ("xset", "foreground", &foreground, &foreground, &v, &v, &v, &v,
00145     &dv, &dv, &dv, &dv, 5L, 4096);
00146 
00147   C2F(dr)("xset","font",&fontStyle,&fontWidth,&v, &v, &v, &v,&dv, &dv, &dv, &dv, 5L, 4L);
00148 
00149 
00150   /*permet la mise a jour des legendes correspondantes aux entites associees */
00151   for ( i = 0; i < ppLegend->nblegends; i++ )
00152   {
00153     sciPointObj * curObj = ppLegend->pptabofpointobj[i] ;
00154     if ( sciGetIsMark( curObj ) )
00155     {
00156       ppLegend->pstyle[i] = -sciGetMarkStyle( curObj );
00157     }
00158     else
00159     {
00160       ppLegend->pstyle[i] = sciGetForeground( curObj );
00161     }
00162   }
00163   Legends( ppLegend->pstyle, &(ppLegend->nblegends), getStrMatElement(sciGetText(pObj),0,0) ) ;
00164 
00165 
00166   /* restore the graphic context */
00167 
00168   C2F (dr1) ("xset", "dashes", &oldDashStyle, &v, &v, &v, &v, &v, &dv, &dv, &dv, &dv, 5L, 6L);
00169   C2F (dr1) ("xset", "foreground", &oldForeground, &v, &v, &v, &v, &v, &dv, &dv, &dv, &dv, 5L, 10L);
00170 #ifdef _MSC_VER 
00171   if ( flag_DO == 1) ReleaseWinHdc ();
00172 #endif
00173 
00174   return 0 ;
00175 
00176 }

Here is the call graph for this function:

Here is the caller graph for this function:


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