chart.cpp File Reference

#include "wx/wxprec.h"
#include "wx/wx.h"
#include "chart.h"
#include <math.h>

Include dependency graph for chart.cpp:

Go to the source code of this file.

Functions

static double st_difference (double val, int multi, bool sens=true)
static double st_decalage (double IncX, double MinX)
static double st_origine (double IncX, double MinX)
static void st_InverseCol (double *l_MinCol, double *l_MaxCol)


Function Documentation

static double st_decalage ( double  IncX,
double  MinX 
) [static]

Definition at line 152 of file chart.cpp.

Referenced by wxChart::DrawAxe(), and wxChart::DrawGrille().

00153 {
00154   double retour = 0.00;
00155   div_t result;
00156 
00157   if (IncX >= 1)
00158   {
00159      result = div(MinX, IncX);
00160      if ( result.rem == 0 )
00161      {
00162         if (MinX - (int)MinX > 0 )
00163            retour = ((result.quot + 1) * IncX) - MinX;
00164          }
00165          else
00166          {
00167         retour = ((result.quot+1) * IncX) - MinX;
00168          }
00169   }
00170   return retour;
00171 }

Here is the caller graph for this function:

static double st_difference ( double  val,
int  multi,
bool  sens = true 
) [static]

Definition at line 123 of file chart.cpp.

Referenced by wxChart::Draw().

00124 {
00125     double retour=0;
00126     div_t result;
00127 
00128         result = div(int(val), multi);
00129         // multiple sup
00130         if ( sens )
00131         {
00132        if ( val > 1)
00133            {
00134           if ( result.rem == 0 )
00135           {
00136              if (val - (int)val > 0 )
00137                  retour =  (multi - result.rem) - (val - int(val));
00138                   }
00139           else
00140                   {
00141               retour =  (multi - result.rem) - (val - int(val));
00142                   }
00143            }
00144         }
00145     // multiple inf
00146         else
00147                 retour = result.rem + (val - (int)val);
00148 
00149         return retour;
00150 }

Here is the caller graph for this function:

static void st_InverseCol ( double *  l_MinCol,
double *  l_MaxCol 
) [static]

Definition at line 196 of file chart.cpp.

00197 {
00198    if  (*l_MinCol > *l_MaxCol)
00199    {
00200      int tempo = *l_MaxCol;
00201          *l_MaxCol = *l_MinCol;
00202          *l_MinCol = tempo;
00203    }
00204 
00205 }

static double st_origine ( double  IncX,
double  MinX 
) [static]

Definition at line 174 of file chart.cpp.

Referenced by wxChart::DrawAxe().

00175 {
00176    double retour = MinX;
00177    div_t result;
00178 
00179    if (IncX >=1)
00180    {
00181       result = div(MinX, IncX);
00182           if (result.rem == 0)
00183       {
00184                   if (MinX - (int)MinX > 0 )
00185                           retour = (result.quot + 1) * IncX;
00186       }
00187       else
00188           {
00189           retour = (result.quot + 1) * IncX;
00190           }
00191    }
00192    return retour;
00193 }

Here is the caller graph for this function:


Generated on Wed Jul 29 16:35:34 2009 for creaMaracasVisu_lib by  doxygen 1.5.3