pGraphicalFunction Class Reference

#include <pGraphicalFunction.h>

Inheritance diagram for pGraphicalFunction:
Inheritance graph
[legend]
Collaboration diagram for pGraphicalFunction:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 pGraphicalFunction (wxString name=wxEmptyString, int flags=0x00)
 ~pGraphicalFunction ()
virtual int getXTraslation ()
virtual int getmType ()
virtual int vGetType ()
virtual void getOffsets (int &offsetX, int &offSetY)
virtual void getFactorZoom (float &fz)
virtual void getFromWindowV (bool &fw)
virtual void getIfActual (bool &actual)
virtual void getMax (int &maxX, int &maxY)
virtual void getMaxShowed (int &maxX, int &maxY)
virtual void getMinShowed (int &minX, int &minY)
virtual void getScreens (int &scrX, int &scrY)
virtual void setScreens (int scrX, int scrY)
virtual void getScales (double &scaleX, double &scaleY)
virtual void getDrawing (bool &draw)
virtual void ifShowPoints (bool &show)
virtual void Rewind ()
virtual bool GetNextXY (double &x, double &y)
virtual void GetPoints (wxList &points)
virtual void getMousePoint (int &x, int &y)
virtual void getSize (int &size)
virtual void getDirection (bool &dir)
int validPointOnFunction (wxPoint realPoint)
int getIndexOf (wxPoint realpoint)
wxNode * GetPointAt (int movingPointIndex)
bool AddNewPoint (int x, int y)
bool AddPoint (int aX, int aY, bool order=true)
bool DeletePoint (int aX, int aY)
bool changePoint (wxPoint newCoords, int movingIndexPoint)
double * getX_RealValues ()
double * getY_RealValues ()
bool orderPoints ()
bool deletePointAt (int index)
int getSizePoints ()
void setScales ()
bool isInFunction (int x, int y)
wxNode * getBefore (pFunctionPoint *point)
bool isInLine (pFunctionPoint *before, pFunctionPoint *next, pFunctionPoint *point)
double interpolateY (double m, int x1, int y1, int x)
void setUp ()
void clearSplineVectors ()
void initializeSplines ()
void addSplinesPoints ()
void initializeSplineVectors ()
void GetSplinePoint (double t, double &x, double &y)
virtual std::vector< double > getXSpline ()
virtual std::vector< double > getYSpline ()
virtual int getOffsetPixelsXv ()
virtual int getOffsetPixelsYv ()
void save (wxString fileName)
void load (wxString fileName)
void SetShowPoints (bool showPoints)
bool getShowPoints ()
void setScreenX (int scrX)
int getScreenX ()
void setScreenY (int scrY)
int getScreenY ()
void setStartX (double aStartX)
double getStartX ()
void setStartY (double aStartY)
double getStartY ()
void setEndX (double aEndX)
double getEndX ()
void setEndY (double aEndY)
double getEndY ()
void setScaleX (double aScaleX)
double getScaleX ()
void setScaleY (double aScaleY)
double getScaleY ()
void setMinX (double aMinX)
double getMinX ()
void setMinY (double aMinY)
double getMinY ()
void setMaxX (double aMaxX)
double getMaxX ()
void setMaxY (double aMaxY)
double getMaxY ()
void setOffsetX (double aOffsetX)
double getOffsetX ()
void setOffsetY (double aOffsetY)
double getOffsetY ()
void setType (int aType)
int getType ()
int getValidPointRange ()
void setValidPointRange (int theRange)
void SetDrawing (bool d)
bool GetDrawing ()
void SetMousePoint (wxPoint p)
wxPoint getMousePoint ()
void setActual (bool act)
bool getActual ()
void setScaleWay (int typeS)
int getScaleWay ()
void setFromWindow (bool w)
bool getFromWindow ()
void setFactorZoom (float factor)
void setEditable (bool edit)
bool getEditable ()
bool getZoomB ()
void setZoomIn (bool z)
void setInitialDrawPoint (pFunctionPoint *initialPoint)
pFunctionPointgetInitialDrawPoint ()
void setFinalDrawPoint (pFunctionPoint *finalPoint)
pFunctionPointgetFinallDrawPoint ()
void zooming (int clickedX, int clickedY, int width)
void setOffsets (int offx, int offy)
void setMinShowed ()
int getMinXShowed ()
int getMinYShowed ()
int getMaxXShowed ()
int getMaxYShowed ()
void setMinShowedX (int msx)
void setMinShowedY (int msy)
void setMaxShowedX (int msx)
void setMaxShowedY (int msy)
int getOffsetPixelsX ()
int getOffsetPixelsY ()
void setOffsetPixelX (int offX)
void setOffsetPixelY (int offY)
void setColorPoints (std::vector< pColorPoint * > &colorVector)
void getColorPoints (std::vector< pColorPoint * > &colorVector)
void setmType (int mt)
void setXTraslation (int xT)
bool initializePolygon (wxPoint *points, double x1, double y1, double x2, double y2)
void draw (wxDC &dc, mpWindow &w, double x1, double y1, double x2, double y2, int orgy)
void drawSplineCurve (wxDC &dc, mpWindow &w, int orgy)
void drawLineToMousePoint (wxDC &dc, mpWindow &w, int orgy)
void drawFunction (wxDC &dc, mpWindow &w, int orgy)
void drawPoints (wxDC &dc, mpWindow &w, int orgy)
virtual void Plot (wxDC &dc, mpWindow &w)
virtual bool HasBBox ()
virtual double GetMinX ()
virtual double GetMaxX ()
virtual double GetMinY ()
virtual double GetMaxY ()
wxString GetName () const
const wxFont & GetFont () const
const wxPen & GetPen () const
void SetName (wxString name)
void SetFont (wxFont &font)
void SetPen (wxPen &pen)
int GetYTranslated (double sizey, double y)

Protected Attributes

int m_flags
 Holds label alignment.
wxList points
double scaleX
double scaleY
int offsetX
int offsetY
wxFont m_font
 Layer's font.
wxPen m_pen
 Layer's pen.
wxString m_name
 Layer's name.

Private Attributes

pLogicalFunctionlogicFunction
bool showPointsF
double _startX
double _startY
double _endX
double _endY
double _scaleX
double _scaleY
double _minX
double _minY
double _maxX
double _maxY
double _offsetX
double _offsetY
int _type
wxList realPoints
std::vector< pColorPoint * > f_colorPoints
wxNode * node
int validPointRange
bool drawing
wxPoint mousePoint
int screenX
int screenY
bool ifActual
int scaleWay
bool fromWindow
float factorZoom
bool editable
bool zoomIn
pFunctionPointinitialDrawingPoint
pFunctionPointfinalDrawingPoint
int minShowedX
int maxShowedX
int minShowedY
int maxShowedY
std::vector< double > xSpline
std::vector< double > ySpline
vtkKochanekSpline * xKSpline
vtkKochanekSpline * yKSpline
int offsetPixelX
int offsetPixelY
int mType
int xTraslation

Detailed Description

Definition at line 68 of file pGraphicalFunction.h.


Constructor & Destructor Documentation

pGraphicalFunction::pGraphicalFunction ( wxString  name = wxEmptyString,
int  flags = 0x00 
)

Definition at line 27 of file pGraphicalFunction.cxx.

References DEFAULT.

00028 {
00029         SetName(name);
00030         showPointsF = false;
00031         validPointRange = 5;
00032         logicFunction = new pLogicalFunction ();
00033         fromWindow=false;
00034         factorZoom=1;
00035         drawing=false;
00036         editable=true;
00037         ifActual=false;
00038         zoomIn=false;
00039         setOffsetX(0);
00040         setOffsetY(0);
00041         initialDrawingPoint=NULL;
00042         finalDrawingPoint=NULL;
00043         //type=1 means that is going to be a piecewise function
00044         _type=1;
00045         xKSpline=NULL;
00046         yKSpline=NULL;
00047         offsetPixelX=0;
00048         offsetPixelY=0;
00049         xTraslation=0;
00050         mType=DEFAULT;
00051         
00052 }

pGraphicalFunction::~pGraphicalFunction (  ) 

Is the destructor!!!

Definition at line 57 of file pGraphicalFunction.cxx.

00058 {
00059         
00060 }


Member Function Documentation

bool pGraphicalFunction::AddNewPoint ( int  x,
int  y 
)

Definition at line 141 of file pGraphicalFunction.cxx.

References fromWindow, logicFunction, pLogicalFunction::setEndPoints(), pLogicalFunction::setStartPoints(), and setUp().

Referenced by pPlotterWindow::onAddNewPoint(), and pPlotterWindow::onAddPoint().

00142 {
00143         bool added= logicFunction -> AddNewPoint ( x, y );
00144         if(!fromWindow)
00145          setUp();
00146         else
00147         {
00148                 logicFunction->setEndPoints();
00149                 logicFunction->setStartPoints();
00150         }
00151         return added;
00152 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool pGraphicalFunction::AddPoint ( int  aX,
int  aY,
bool  order = true 
)

this method add a new logical point to the function, this point is one of those used to draw the function

Definition at line 161 of file pGraphicalFunction.cxx.

References fromWindow, logicFunction, pLogicalFunction::setEndPoints(), pLogicalFunction::setStartPoints(), and setUp().

Referenced by HistogramWidget::addPointToTransferenceFunction(), and pPlotterWindow::onAddPoint().

00162 {       
00163         bool added=false;
00164         if (logicFunction!=NULL){
00165                 added=logicFunction -> AddPoint( aX, aY,order );
00166                 if(!fromWindow)
00167                         setUp();
00168                 else
00169                 {
00170                         logicFunction->setEndPoints();
00171                         logicFunction->setStartPoints();
00172                 } // if fromWindow
00173         } // if logicFunction
00174         return added;
00175 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::addSplinesPoints (  ) 

Definition at line 373 of file pGraphicalFunction.cxx.

References pLogicalFunction::GetPointAt(), pFunctionPoint::getRealX(), pFunctionPoint::getRealY(), logicFunction, node, xKSpline, and yKSpline.

Referenced by initializeSplines(), pPlotterWindow::onAddNewPoint(), pPlotterWindow::onAddPoint(), pPlotterWindow::onChangeActual(), pPlotterWindow::onDeletePoint(), pPlotterWindow::onMouseMove(), and pPlotter::update().

00374         {
00375                 xKSpline->RemoveAllPoints();
00376                 yKSpline->RemoveAllPoints();
00377                 wxNode *node= logicFunction->GetPointAt(0);
00378                 pFunctionPoint* p;
00379                 int i=0;
00380                 while(node)
00381                 {
00382                         p=(pFunctionPoint*)node->GetData();
00383                         xKSpline->AddPoint(i,p->getRealX());
00384                         yKSpline->AddPoint(i,p->getRealY());
00385                         i++;
00386                         node=node->GetNext();
00387                 }
00388         }

Here is the call graph for this function:

Here is the caller graph for this function:

bool pGraphicalFunction::changePoint ( wxPoint  newCoords,
int  movingIndexPoint 
)

Change de coordinates of the given point if it is possible and return the result of the invoked action. True if it was possible to do the change.

Change de coordinates of the given index point to the newCoords, if it is possible and return the result of the invoked action. Return TRUE if it was possible to do the change. A valid change is when the new x value of the point is still between the previous and next point, when condition.

Definition at line 215 of file pGraphicalFunction.cxx.

References fromWindow, logicFunction, pLogicalFunction::setEndPoints(), pLogicalFunction::setStartPoints(), and setUp().

Referenced by pPlotterWindow::onMouseMove().

00216 {
00217         bool added= (logicFunction -> changePoint( newCoords, movingIndexPoint ));
00218         if(!fromWindow)
00219          setUp();
00220         else
00221         {
00222                 logicFunction->setEndPoints();
00223                 logicFunction->setStartPoints();
00224         }
00225         return added;
00226 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::clearSplineVectors (  ) 

Definition at line 350 of file pGraphicalFunction.cxx.

References xSpline, and ySpline.

Referenced by pPlotterWindow::onAddNewPoint(), pPlotterWindow::onAddPoint(), pPlotterWindow::onChangeActual(), pPlotterWindow::onDeletePoint(), pPlotterWindow::onLine(), pPlotterWindow::onMouseMove(), and pPlotter::update().

00351         {
00352                 xSpline.clear();
00353                 ySpline.clear();
00354         }

Here is the caller graph for this function:

bool pGraphicalFunction::DeletePoint ( int  aX,
int  aY 
)

deletes the point given by the user from the collection of logical points of the function

deletes the point given by the user from the collection of logical points of the function is not used

Definition at line 182 of file pGraphicalFunction.cxx.

References fromWindow, logicFunction, pLogicalFunction::setEndPoints(), pLogicalFunction::setStartPoints(), and setUp().

Referenced by pPlotterWindow::DeletePointFunction().

00183 {
00184         bool added= logicFunction -> DeletePoint( aX, aY );     
00185         if(!fromWindow)
00186          setUp();
00187         else
00188         {
00189                 logicFunction->setEndPoints();
00190                 logicFunction->setStartPoints();
00191         }
00192         return added;
00193 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool pGraphicalFunction::deletePointAt ( int  index  ) 

This method get a pointer to the node in the real points list that is inmediately previous to the searched by parameter.

Precondition:
The seached point (realX, realY) is not the first point of the list.
Parameters:
realX 
realY Deletes a point of the function given its index

deletes a point of the functio given its index

Definition at line 198 of file pGraphicalFunction.cxx.

References fromWindow, logicFunction, pLogicalFunction::setEndPoints(), pLogicalFunction::setStartPoints(), and setUp().

Referenced by HistogramWidget::erasePointsTransferenceFunction(), and pPlotterWindow::onDeletePoint().

00199 {
00200         bool added=logicFunction -> deletePointAt( index );
00201         if(!fromWindow)
00202          setUp();
00203         else
00204         {
00205                 logicFunction->setEndPoints();
00206                 logicFunction->setStartPoints();
00207         }
00208         return added;
00209 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pPlotterLayer::draw ( wxDC &  dc,
mpWindow w,
double  x1,
double  y1,
double  x2,
double  y2,
int  orgy 
) [inherited]

Definition at line 44 of file pPlotterLayer.cxx.

References mpLayer::GetYTranslated().

Referenced by pPlotterLayer::drawFunction(), and pPlotterLayer::drawSplineCurve().

00045 {
00046         
00047         //intercepts
00048         float m=((float)(y2-y1))/(x2-x1);
00049         float x0=-y1/m+x1;
00050         float y0=-m*x1+y1;      
00051 
00052         double sizedc = dc.GetSize().GetHeight()-orgy;
00053 
00054         //analyzing the curve
00055 
00056                 if(x1<=0 && x2>=0)
00057                 {
00058                         if(y2>=0 && y1>=0)
00059                                         dc.DrawLine(0,GetYTranslated(sizedc,y0), x2,GetYTranslated(sizedc,y2));
00060 
00061                         else if(y2<=0 && y1>=0)
00062                         {
00063                                 if(y0>=0 && x0>=0)
00064                                         dc.DrawLine(0,GetYTranslated(sizedc,y0),x0,GetYTranslated(sizedc,0) );
00065                         }
00066                         else if(y2>=0 && y1<=0)
00067                         {
00068                                 if(y0>=0) 
00069                                 dc.DrawLine(0,GetYTranslated(sizedc,y0),x2,GetYTranslated(sizedc,y2) );
00070                         }
00071         
00072                 }
00073 
00074                 if(x1>=0 && x2>=0)
00075                 {
00076                         if(y1>=0 && y2>=0 )
00077                                 dc.DrawLine(x1,GetYTranslated(sizedc,y1), x2,GetYTranslated(sizedc,y2));
00078                         else if(y1>=0 && y2<=0)
00079                                 dc.DrawLine(x1,GetYTranslated(sizedc,y1),x0,GetYTranslated(sizedc,0) );
00080                         else if(y1<=0 && y2>=0) 
00081                                         dc.DrawLine(x0,GetYTranslated(sizedc,0),x2,GetYTranslated(sizedc,y2));
00082                 }
00083                 
00084                 
00085 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pPlotterLayer::drawFunction ( wxDC &  dc,
mpWindow w,
int  orgy 
) [inherited]

Draw le lines between the points of the function

Draw the lines between the points of the function

Definition at line 290 of file pPlotterLayer.cxx.

References pPlotterLayer::draw(), pPlotterLayer::getMaxShowed(), pPlotterLayer::getMinShowed(), pPlotterLayer::getmType(), pPlotterLayer::getOffsetPixelsXv(), pPlotterLayer::getOffsetPixelsYv(), pPlotterLayer::GetPoints(), pFunctionPoint::getRealX(), pFunctionPoint::getRealY(), mpLayer::GetYTranslated(), pPlotterLayer::initializePolygon(), pPlotterLayer::offsetX, pPlotterLayer::offsetY, pPlotterLayer::points, pPlotterLayer::Rewind(), pPlotterLayer::scaleX, and pPlotterLayer::scaleY.

Referenced by pPlotterLayer::Plot().

00291 {
00292 
00293         
00294         int scrwX,scrwY,offsetpx,offsetpy,maxX,minX,maxY,minY;
00295         wxPoint* ppoints=NULL;
00296 
00297         /*
00298         This is the offset of every point scale to the window
00299         pixel
00300         */
00301         offsetpx=getOffsetPixelsXv();
00302         offsetpy=getOffsetPixelsYv();   
00303 
00304         Rewind();
00305         
00306         dc.GetSize(&scrwX, &scrwY);
00307         
00308         //Lines between the points
00309 
00310         int sizedc = dc.GetSize().GetHeight()-orgy;
00311         
00312         GetPoints(points);
00313 
00314         // type of plotter
00315         int type=getmType();
00316         /***********/
00317         getMaxShowed(maxX,maxY);
00318         getMinShowed(minX,minY);
00319         /***********/
00320 
00321         //traslation
00322         //int xTraslation=getXTraslation(); //JPRx
00323         wxNode* node= points.GetFirst();
00324         // int i=1;//points.GetCount()+1; //JPRx
00325         int j=2;
00326         /*
00327          Fill it if it is an histogram
00328         */
00329         wxPoint point;
00330         // pFunctionPoint* pointk; //JPRx
00331         if(type==2)
00332         {
00333                 /*
00334                 Fill the function if it represented an histogram
00335           */
00336                 ppoints=(wxPoint*)malloc(sizeof(int)*2*(points.GetCount()+2));
00337                 //initialize points
00338                 point.x=-5000;
00339                 point.y=GetYTranslated(sizedc,-5000);
00340                 ppoints[0]=point;
00341                 ppoints[1]=point;
00342 
00343         }
00344         
00345         
00346         while (node!=NULL && node->GetNext()!=NULL)
00347         { 
00348                 pFunctionPoint* pointi=(pFunctionPoint*)node->GetData();
00349                                 wxNode* nextNode=node->GetNext();
00350                 pFunctionPoint* pointj=(pFunctionPoint*)nextNode->GetData();
00351                                                 
00352                 // we do the offset
00353                 int pxi=(pointi->getRealX()-minX)-offsetX;
00354                 int pyi=(pointi->getRealY()-minY)-offsetY;
00355                 int pxj=(pointj->getRealX()-minX)-offsetX;
00356                 int pyj=(pointj->getRealY()-minY)-offsetY;
00357 
00358 
00359                 int cxi=pxi* scaleX + offsetpx; //+ xTraslation;
00360                 int cxj=pxj* scaleX + offsetpx; //+ xTraslation;
00361                 int cyi=pyi* scaleY+ offsetpy ;
00362                 int cyj=pyj* scaleY+ offsetpy ;
00363                 //dc.DrawLine(pxi* scaleX + offsetpx,pyi* scaleY+ offsetpy, pxj* scaleX + offsetpx,pyj* scaleY+ offsetpy );
00364                 if(type!=2)
00365                         draw(dc,w,pxi* scaleX + offsetpx,pyi* scaleY+ offsetpy, pxj* scaleX + offsetpx,pyj* scaleY+ offsetpy,orgy );
00366                         //dc.DrawLine(pxi* scaleX + offsetpx,pyi* scaleY+ offsetpy, pxj* scaleX + offsetpx,pyj* scaleY+ offsetpy );
00367                 else if(type==2)
00368                 {
00369                         if(!initializePolygon(ppoints,cxi,cyi,cxj,cyj) && ((cxi<=0 && cxj>=0)||(cxi>=0 && cxj>=0)))
00370                         {
00371                                         point.x=cxj;
00372                                         point.y=GetYTranslated(sizedc,cyj);
00373                                         ppoints[j]=point;
00374                                         j++;
00375                 
00376                         }
00377                 }
00378                 
00379                 node=node->GetNext();
00380 
00381         } 
00382         if(type==2)
00383         {
00384                 //point.x=vx.at(size-1)* scaleX + offsetpx;
00385                 point.x=ppoints[j-1].x;
00386                 point.y=GetYTranslated(sizedc,0);
00387                 //ppoints[vx.size()]=point;
00388                 ppoints[j]=point;
00389                 /*
00390                 Fill the function if it represented an histogram
00391           */
00392                 //ppoints=(wxPoint*)malloc(sizeof(int)*2*(vx.size()+1));
00393                 //settings for fill
00394                 //point.x=vx.at(0)*scaleX + offsetpx;
00395                 point.x=ppoints[0].x;
00396                 point.y=GetYTranslated(sizedc,0);
00397                 //ppoints[vx.size()+1]=point;
00398                 ppoints[j+1]=point;
00399 
00400                 dc.SetBrush(wxBrush( wxColour(239,238,242) ,wxSOLID  ));
00401                 dc.SetPen(wxPen( wxColour(0,0,0) ,1,wxSOLID  ));
00402                 //dc.DrawPolygon(vx.size()+2,ppoints,0,0);
00403                 dc.DrawPolygon(j+2,ppoints,0,0);
00404 
00405         }
00406         
00407 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pPlotterLayer::drawLineToMousePoint ( wxDC &  dc,
mpWindow w,
int  orgy 
) [inherited]

Draw the line between the last point of the function and the position of the mouse

Definition at line 461 of file pPlotterLayer.cxx.

References mpWindow::drawGuideLines(), pPlotterLayer::getDirection(), pPlotterLayer::getMaxShowed(), pPlotterLayer::getMinShowed(), pPlotterLayer::getMousePoint(), pPlotterLayer::getOffsetPixelsXv(), pPlotterLayer::getOffsetPixelsYv(), pPlotterLayer::GetPoints(), pFunctionPoint::getRealX(), pFunctionPoint::getRealY(), pPlotterLayer::getSize(), pPlotterLayer::offsetX, pPlotterLayer::offsetY, pPlotterLayer::points, pPlotterLayer::Rewind(), pPlotterLayer::scaleX, and pPlotterLayer::scaleY.

Referenced by pPlotterLayer::Plot().

00462 {
00463         int x,y,sizeP,maxX,maxY,minX,minY;
00464         bool direction;
00465         
00466         Rewind();
00467         
00468         getMousePoint(x,y);
00469         getDirection(direction);
00470         getSize(sizeP);
00471         //Lines betwen the points
00472         GetPoints(points);
00473 
00474         wxNode *node=points.GetLast();
00475         wxNode *node1=points.GetFirst();
00476         
00477         
00478         /*
00479         This is the offset of every point scale to the window
00480         pixel
00481         */
00482         int offsetpx = getOffsetPixelsXv();
00483         int offsetpy = getOffsetPixelsYv();
00484         /***********/
00485         getMaxShowed(maxX,maxY);
00486         getMinShowed(minX,minY);
00487         /***********/
00488         //traslation
00489 //      int xTraslation=getXTraslation(); //EED
00490         
00491         if(node)
00492         {
00493                 pFunctionPoint* lastPoint=(pFunctionPoint*)node->GetData();
00494                 pFunctionPoint* firstPoint=(pFunctionPoint*)node1->GetData();
00495 
00496                 //LeftDrawing
00497                 if(lastPoint->getRealX()<x && direction && sizeP >=2)
00498                         
00499                         dc.DrawLine((lastPoint->getRealX()-minX-offsetX)*scaleX + offsetpx,(lastPoint->getRealY()-minY-offsetY)*scaleY+ offsetpy, (x-minX)*scaleX + offsetpx, (y-minY)*scaleY + offsetpy);
00500                 
00501                 //right drawing
00502                 else if(firstPoint->getRealX()>x && !direction && sizeP >=2 )
00503                         
00504                         dc.DrawLine((firstPoint->getRealX()-minX-offsetX)*scaleX+ offsetpx,(firstPoint->getRealY()-minY-offsetY)*scaleY+ offsetpy,(x-minX)*scaleX+ offsetpx, (y-minY)*scaleY+ offsetpy);
00505                 
00506                 //just a point
00507                 else if(sizeP==1 )
00508                 {
00509                         dc.DrawLine((lastPoint->getRealX()-minX-offsetX)*scaleX + offsetpx,(lastPoint->getRealY()-minY-offsetY)*scaleY+ offsetpy, (x-minX)*scaleX+ offsetpx, (y-minY)*scaleY+ offsetpy);
00510                 }
00511         }                       
00512         
00513         if( w.drawGuideLines() )  
00514         {
00515                 dc.SetPen(wxPen(  wxColour(255,0,0),1,wxDOT ));
00516                 // Drawing the horizontal guide line    
00517                 dc.DrawLine( 0, (y-minY)*scaleY + offsetpy, (x-minX)*scaleX + offsetpx, (y-minY)*scaleY + offsetpy);                                    
00518                 // Drawing the vertical guide line      
00519                 dc.DrawLine( (x-minX)*scaleX + offsetpx,0, (x-minX)*scaleX + offsetpx, (y-minY)*scaleY + offsetpy);     
00520         }
00521 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pPlotterLayer::drawPoints ( wxDC &  dc,
mpWindow w,
int  orgy 
) [inherited]

Draw the points of the function

Definition at line 412 of file pPlotterLayer.cxx.

References pPlotterLayer::getMaxShowed(), pPlotterLayer::getMinShowed(), pPlotterLayer::GetNextXY(), pPlotterLayer::getOffsetPixelsXv(), pPlotterLayer::getOffsetPixelsYv(), mpLayer::GetYTranslated(), MOVE, pPlotterLayer::offsetX, pPlotterLayer::offsetY, pPlotterLayer::points, pPlotterLayer::Rewind(), pPlotterLayer::scaleX, and pPlotterLayer::scaleY.

Referenced by pPlotterLayer::Plot().

00413 {
00414         
00415         Rewind();
00416         double x, y;
00417         int minX,maxX,minY,maxY;
00418 
00419         double sizedc = dc.GetSize().GetHeight()-orgy;
00420         
00421         /*
00422         This is the offset of every point scale to the window
00423         pixel
00424         */
00425         int offsetpx=getOffsetPixelsXv();
00426         int offsetpy=getOffsetPixelsYv();
00427         //traslation
00428 //      int xTraslation=getXTraslation();  //EED
00429         /*wxPen mypen(*wxBLACK, 5, wxSOLID);
00430         dc.SetPen(mypen);*/
00431         /***********/
00432         getMaxShowed(maxX,maxY);
00433         getMinShowed(minX,minY);
00434         /***********/
00435         //we have to draw the points
00436 
00437         while (GetNextXY(x, y))
00438         {
00439                 //GetNextXY(x, y);
00440                 //set the points of the polygons
00441                 wxPoint points[4];
00442                 dc.SetBrush(wxBrush( wxColour(255,0,0),wxSOLID  ));
00443                 //dc.SetPen(wxPen(wxColour(0,0,0),1,wxSOLID) );
00444                 points[0].x=((x-minX-offsetX)*scaleX + offsetpx-MOVE);
00445                 points[0].y=GetYTranslated(sizedc,((y-minY-offsetY)*scaleY+ offsetpy-MOVE));
00446                 points[1].x=((x-minX-offsetX)*scaleX+ offsetpx+MOVE);
00447                 points[1].y=GetYTranslated(sizedc,((y-minY-offsetY)*scaleY+ offsetpy-MOVE));
00448                 points[2].x=((x-minX-offsetX)*scaleX+ offsetpx+MOVE);
00449                 points[2].y=GetYTranslated(sizedc,((y-minY-offsetY)*scaleY+ offsetpy+MOVE));
00450                 points[3].x=((x-minX-offsetX)*scaleX+ offsetpx-MOVE);
00451                 points[3].y=GetYTranslated(sizedc,((y-minY-offsetY)*scaleY+ offsetpy+MOVE));
00452                 if((x-minX-offsetX)*scaleX >=0 && (y-minY-offsetY/*w.getMinScrY()*/)*scaleY>=0)
00453                 dc.DrawPolygon(4,points,0,0);
00454         }
00455 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pPlotterLayer::drawSplineCurve ( wxDC &  dc,
mpWindow w,
int  orgy 
) [inherited]

Draw the function with th spline points

Definition at line 91 of file pPlotterLayer.cxx.

References pPlotterLayer::draw(), pPlotterLayer::getMaxShowed(), pPlotterLayer::getMinShowed(), pPlotterLayer::getmType(), pPlotterLayer::getOffsetPixelsXv(), pPlotterLayer::getOffsetPixelsYv(), pPlotterLayer::getXSpline(), pPlotterLayer::getYSpline(), mpLayer::GetYTranslated(), pPlotterLayer::initializePolygon(), pPlotterLayer::offsetX, pPlotterLayer::offsetY, pPlotterLayer::scaleX, and pPlotterLayer::scaleY.

Referenced by pPlotterLayer::Plot().

00092 {
00093         std::vector<double> vx=getXSpline();
00094         std::vector<double> vy=getYSpline();
00095         wxPoint* ppoints;
00096         
00097         int /*counter=0,*/ minX,maxX,minY,maxY; // JPRx
00098         /*
00099         This is the offset of every point scale to the window
00100         pixel
00101         */
00102         int offsetpx=getOffsetPixelsXv();
00103         int offsetpy=getOffsetPixelsYv();
00104         
00105         // type of plotter
00106         int type=getmType();
00107  
00108         wxPoint point;
00109         /***********/
00110         getMaxShowed(maxX,maxY);
00111         getMinShowed(minX,minY);
00112         /***********/
00113 
00114         
00115         if(type==2)
00116         {
00117          /*
00118                 Fill the function if it represented an histogram
00119           */
00120                 ppoints=(wxPoint*)malloc(sizeof(int)*2*(vx.size()+2));
00121                 //initialize points
00122                 point.x=-5000;
00123                 point.y=-5000;
00124                 ppoints[0]=point;
00125                 ppoints[1]=point;
00126         }
00127         
00128         int size=vx.size();
00129         int j=2;
00130 
00131         for(int i=0;(i+1)< size;i++)
00132         {
00133                 
00134                 
00135                 double cxi=(vx.at(i)-minX-offsetX)*scaleX+offsetpx;
00136                 double cyi=(vy.at(i)-minY-offsetY)*scaleY+offsetpy;
00137                 
00138                 double cxj=(vx.at(i+1)-minX-offsetX)*scaleX+offsetpx;
00139                 double cyj=(vy.at(i+1)-minY-offsetY)*scaleY+offsetpy;
00140                 
00141                 
00142                 if(type!=2)     
00143                         draw(dc,w,cxi,cyi,cxj,cyj,orgy);
00144                 else if(type==2)
00145                 {
00146                         if(!initializePolygon(ppoints,cxi,cyi,cxj,cyj) && ((cxi<=0 && cxj>=0)||(cxi>=0 && cxj>=0)))
00147                         {
00148                                         point.x=cxj;
00149                                         point.y=cyj;
00150                                         ppoints[j]=point;
00151                                         j++;
00152                 
00153                         }
00154                 }
00155                 
00156         }
00157         if(type==2)
00158         {
00159                 //point.x=vx.at(size-1)* scaleX + offsetpx;
00160                 point.x=ppoints[j-1].x;
00161                 point.y=0;
00162                 //ppoints[vx.size()]=point;
00163                 ppoints[j]=point;
00164                 /*
00165                 Fill the function if it represented an histogram
00166           */
00167                 //ppoints=(wxPoint*)malloc(sizeof(int)*2*(vx.size()+1));
00168                 //settings for fill
00169                 //point.x=vx.at(0)*scaleX + offsetpx;
00170                 point.x=ppoints[0].x;
00171                 point.y=0;
00172                 //ppoints[vx.size()+1]=point;
00173                 ppoints[j+1]=point;
00174 
00175                 dc.SetBrush(wxBrush( wxColour(239,238,242) ,wxSOLID  ));
00176                 dc.SetPen(wxPen( wxColour(0,0,0) ,1,wxSOLID  ));
00177                 //dc.DrawPolygon(vx.size()+2,ppoints,0,0);
00178                 for(int i = 0; i <= j + 1; i++){
00179                         int sizedc = dc.GetSize().GetHeight()-orgy;
00180                         ppoints[i].y = GetYTranslated(sizedc, ppoints[i].y);
00181                 }       
00182                 dc.DrawPolygon(j+2,ppoints,0,0);
00183         }
00184         
00185         
00186 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool pGraphicalFunction::getActual (  ) 

Definition at line 605 of file pGraphicalFunction.cxx.

References ifActual.

Referenced by pPlotterWindow::moveFunctions(), pPlotterWindow::onChangeActual(), pPlotterWindow::onMyZoomIn(), and pPlotterWindow::onMyZoomOut().

00606 {
00607         return ifActual;
00608 }

Here is the caller graph for this function:

wxNode * pGraphicalFunction::getBefore ( pFunctionPoint point  ) 

Definition at line 284 of file pGraphicalFunction.cxx.

References pLogicalFunction::GetPointAt(), pFunctionPoint::getRealX(), logicFunction, and node.

Referenced by isInFunction().

00285 {
00286         int minDiference=10000000;
00287         wxNode* node=logicFunction->GetPointAt(0);
00288         wxNode* before=NULL;
00289 
00290         while(node)
00291         {
00292                 pFunctionPoint* before1=(pFunctionPoint*)node->GetData();
00293                 int beforeX=before1->getRealX();
00294                 int pointX=point->getRealX();
00295                 if(beforeX<pointX)
00296                 {
00297                   int minDiference1=pointX-beforeX;
00298                   if(minDiference1<minDiference)
00299                   {
00300                           minDiference=minDiference1;
00301                           before=node;
00302                   }
00303                 }
00304                 node=node->GetNext();
00305         }
00306         return before;
00307 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::getColorPoints ( std::vector< pColorPoint * > &  colorVector  ) 

Definition at line 840 of file pGraphicalFunction.cxx.

References f_colorPoints, pColorPoint::getColor(), pColorPoint::getRealX(), and pColorPoint::isTemporalColor().

00841 {
00842         int i = 0;      
00843         while(i<(int)(f_colorPoints.size()))
00844         {
00845                 pColorPoint * originaslPoint = f_colorPoints[i];
00846                 pColorPoint * copyPoint = new pColorPoint(originaslPoint->getRealX(), originaslPoint->getColor(), originaslPoint->isTemporalColor());
00847                 colorVector.push_back(copyPoint);               
00848                 i++;
00849         }
00850 }

Here is the call graph for this function:

virtual void pGraphicalFunction::getDirection ( bool &  dir  )  [inline, virtual]

this method gets the direction of the drawing

Reimplemented from pPlotterLayer.

Definition at line 280 of file pGraphicalFunction.h.

References logicFunction.

00281         {               
00282                 logicFunction -> getDirection (dir);
00283         }

bool pGraphicalFunction::GetDrawing (  )  [inline]

Definition at line 549 of file pGraphicalFunction.h.

References drawing.

00550         {
00551                 return drawing;
00552         }

virtual void pGraphicalFunction::getDrawing ( bool &  draw  )  [inline, virtual]

Let us Know if the user has finished the drawing that starts before.

Reimplemented from pPlotterLayer.

Definition at line 207 of file pGraphicalFunction.h.

References drawing.

00208         {
00209                 draw = drawing;
00210         }

bool pGraphicalFunction::getEditable (  )  [inline]

Get editable

Definition at line 614 of file pGraphicalFunction.h.

References editable.

Referenced by pPlotterWindow::onChangeActual(), and pPlotterWindow::onMouseMove().

00615         {
00616                 return editable;
00617         }

Here is the caller graph for this function:

double pGraphicalFunction::getEndX (  ) 

Definition at line 679 of file pGraphicalFunction.cxx.

References pLogicalFunction::getEndX(), and logicFunction.

00679                                    {
00680         return logicFunction->getEndX();
00681 }

Here is the call graph for this function:

double pGraphicalFunction::getEndY (  ) 

Definition at line 688 of file pGraphicalFunction.cxx.

References pLogicalFunction::getEndY(), and logicFunction.

00688                                    {
00689         return logicFunction->getEndY();
00690 }

Here is the call graph for this function:

virtual void pGraphicalFunction::getFactorZoom ( float &  fz  )  [inline, virtual]

Reimplemented from pPlotterLayer.

Definition at line 126 of file pGraphicalFunction.h.

References factorZoom.

00127         {
00128                 fz=factorZoom;
00129         }

pFunctionPoint* pGraphicalFunction::getFinallDrawPoint (  )  [inline]

Get the final drawing point

Returns:
finalDrawingPoint

Definition at line 666 of file pGraphicalFunction.h.

References finalDrawingPoint.

00667         {
00668                 return finalDrawingPoint;       
00669         }

const wxFont& mpLayer::GetFont (  )  const [inline, inherited]

Get font set for this layer.

Returns:
Font

Definition at line 175 of file mathplot.h.

00175 { return m_font; }

bool pGraphicalFunction::getFromWindow (  )  [inline]

Definition at line 593 of file pGraphicalFunction.h.

References fromWindow.

Referenced by pPlotterWindow::onChangeActual(), and pPlotterWindow::onStartDrawing().

00594         {
00595                 return fromWindow;
00596         }

Here is the caller graph for this function:

virtual void pGraphicalFunction::getFromWindowV ( bool &  fw  )  [inline, virtual]

Definition at line 135 of file pGraphicalFunction.h.

References fromWindow.

00136         {
00137                 fw=fromWindow;
00138         }

virtual void pGraphicalFunction::getIfActual ( bool &  actual  )  [inline, virtual]

if the function that is drawing is the actual

Reimplemented from pPlotterLayer.

Definition at line 144 of file pGraphicalFunction.h.

References ifActual.

00145         {
00146                 actual=ifActual;
00147         }

int pGraphicalFunction::getIndexOf ( wxPoint  realpoint  ) 

Definition at line 100 of file pGraphicalFunction.cxx.

References logicFunction.

00101 {
00102         return logicFunction -> getIndexOf( realpoint );        
00103 }

pFunctionPoint* pGraphicalFunction::getInitialDrawPoint (  )  [inline]

Get the initial drawing point

Returns:
initialDrawingPoint

Definition at line 650 of file pGraphicalFunction.h.

References initialDrawingPoint.

00651         {
00652                 return initialDrawingPoint;     
00653         }

virtual void pGraphicalFunction::getMax ( int &  maxX,
int &  maxY 
) [inline, virtual]

get the max of the function in x and y

Reimplemented from pPlotterLayer.

Definition at line 152 of file pGraphicalFunction.h.

References getMaxX(), and getMaxY().

00153         {
00154                 maxX=(int)getMaxX();
00155             maxY=(int)getMaxY();
00156         }

Here is the call graph for this function:

virtual void pGraphicalFunction::getMaxShowed ( int &  maxX,
int &  maxY 
) [inline, virtual]

get the maxShowed of the function in x and y

Reimplemented from pPlotterLayer.

Definition at line 160 of file pGraphicalFunction.h.

References getMaxXShowed(), and getMaxYShowed().

00161         {
00162                 maxX=(int)getMaxXShowed();
00163                 maxY=(int)getMaxYShowed();
00164         }

Here is the call graph for this function:

virtual double mpLayer::GetMaxX (  )  [inline, virtual, inherited]

Get inclusive right border of bounding box.

Returns:
Value

Definition at line 120 of file mathplot.h.

Referenced by mpWindow::UpdateBBox().

00120 { return  1.0; }

Here is the caller graph for this function:

double pGraphicalFunction::getMaxX (  ) 
int pGraphicalFunction::getMaxXShowed (  )  [inline]

Get the maxX Showed

Definition at line 710 of file pGraphicalFunction.h.

References maxShowedX.

Referenced by getMaxShowed(), pPlotterWindow::moveFunctions(), pPlotterWindow::onChangeActual(), pPlotter::onChangeFunction(), pPlotterWindow::setActualScales(), and pPlotter::setAll().

00711         {
00712                 return maxShowedX;
00713         }

Here is the caller graph for this function:

virtual double mpLayer::GetMaxY (  )  [inline, virtual, inherited]

Get inclusive top border of bounding box.

Returns:
Value

Definition at line 130 of file mathplot.h.

Referenced by mpWindow::UpdateBBox().

00130 { return  1.0; }

Here is the caller graph for this function:

double pGraphicalFunction::getMaxY (  ) 

Definition at line 757 of file pGraphicalFunction.cxx.

References pLogicalFunction::getMaxY(), and logicFunction.

Referenced by getMax(), pPlotterWindow::InitFunctionForVectors(), and pPlotterWindow::moveFunctions().

00757                                    {
00758         return logicFunction->getMaxY();
00759 }

Here is the call graph for this function:

Here is the caller graph for this function:

int pGraphicalFunction::getMaxYShowed (  )  [inline]

Get the maxY Showed

Definition at line 717 of file pGraphicalFunction.h.

References maxShowedY.

Referenced by getMaxShowed(), pPlotterWindow::moveFunctions(), pPlotterWindow::onChangeActual(), and pPlotterWindow::setActualScales().

00718         {
00719                 return maxShowedY;
00720         }

Here is the caller graph for this function:

virtual void pGraphicalFunction::getMinShowed ( int &  minX,
int &  minY 
) [inline, virtual]

get the minShowed of the function in x and y

Reimplemented from pPlotterLayer.

Definition at line 168 of file pGraphicalFunction.h.

References getMinXShowed(), and getMinYShowed().

00169         {
00170                 minX=(int)getMinXShowed();
00171                 minY=(int)getMinYShowed();
00172         }

Here is the call graph for this function:

virtual double mpLayer::GetMinX (  )  [inline, virtual, inherited]

Get inclusive left border of bounding box.

Returns:
Value

Definition at line 115 of file mathplot.h.

Referenced by mpWindow::UpdateBBox().

00115 { return -1.0; }

Here is the caller graph for this function:

double pGraphicalFunction::getMinX (  ) 
int pGraphicalFunction::getMinXShowed (  )  [inline]

Get the minX Showed

Definition at line 696 of file pGraphicalFunction.h.

References minShowedX.

Referenced by getMinShowed(), pPlotterWindow::moveFunctions(), pPlotterWindow::onChangeActual(), pPlotter::onChangeFunction(), pPlotterWindow::setActualScales(), and pPlotter::setAll().

00697         {
00698                 return minShowedX;
00699         }

Here is the caller graph for this function:

virtual double mpLayer::GetMinY (  )  [inline, virtual, inherited]

Get inclusive bottom border of bounding box.

Returns:
Value

Definition at line 125 of file mathplot.h.

Referenced by mpWindow::UpdateBBox().

00125 { return -1.0; }

Here is the caller graph for this function:

double pGraphicalFunction::getMinY (  ) 

Definition at line 734 of file pGraphicalFunction.cxx.

References pLogicalFunction::getMinY(), and logicFunction.

Referenced by pPlotterWindow::InitFunctionForVectors(), and pPlotterWindow::moveFunctions().

00734                                    {
00735         return logicFunction->getMinY();
00736 }

Here is the call graph for this function:

Here is the caller graph for this function:

int pGraphicalFunction::getMinYShowed (  )  [inline]

Get the minY Showed

Definition at line 703 of file pGraphicalFunction.h.

References minShowedY.

Referenced by getMinShowed(), pPlotterWindow::moveFunctions(), pPlotterWindow::onChangeActual(), and pPlotterWindow::setActualScales().

00704         {
00705                 return minShowedY;
00706         }

Here is the caller graph for this function:

wxPoint pGraphicalFunction::getMousePoint (  )  [inline]

Definition at line 560 of file pGraphicalFunction.h.

References mousePoint.

00561         {
00562                 return mousePoint;
00563         }

virtual void pGraphicalFunction::getMousePoint ( int &  x,
int &  y 
) [inline, virtual]

Get the point where the user made a click

Reimplemented from pPlotterLayer.

Definition at line 263 of file pGraphicalFunction.h.

References mousePoint.

00264         {
00265                 x=mousePoint.x;
00266                 y=mousePoint.y;
00267         }

virtual int pGraphicalFunction::getmType (  )  [inline, virtual]

Get the type of the curve 1=normal function 2=Histogram

Reimplemented from pPlotterLayer.

Definition at line 98 of file pGraphicalFunction.h.

References mType.

00099         {
00100                 return mType;
00101         }

wxString mpLayer::GetName (  )  const [inline, inherited]

Get layer name.

Returns:
Name

Definition at line 170 of file mathplot.h.

00170 { return m_name; }

virtual bool pGraphicalFunction::GetNextXY ( double &  x,
double &  y 
) [inline, virtual]

Get locus value for next N. Override this function in your implementation.

Parameters:
x Returns X value
y Returns Y value

Reimplemented from pPlotterLayer.

Definition at line 236 of file pGraphicalFunction.h.

References pFunctionPoint::getRealX(), pFunctionPoint::getRealY(), and node.

00237         {
00238                 if(node)
00239                 {
00240                         pFunctionPoint* p=(pFunctionPoint*)node->GetData();
00241                         x=p->getRealX();
00242                         y=p->getRealY();
00243                         node=node->GetNext();
00244                         return true;
00245                 }
00246                 return false;
00247         }

Here is the call graph for this function:

int pGraphicalFunction::getOffsetPixelsX (  )  [inline]

Gets the x-offset of the zoom in pixels

Definition at line 758 of file pGraphicalFunction.h.

References offsetPixelX.

Referenced by pPlotterWindow::onChangeActual(), pPlotterWindow::onMyZoomIn(), pPlotterWindow::onMyZoomOut(), and pPlotterWindow::onStartDrawing().

00759         {
00760                 return offsetPixelX;
00761         }       

Here is the caller graph for this function:

virtual int pGraphicalFunction::getOffsetPixelsXv (  )  [inline, virtual]

Gets the x-offset of the zoom in pixels

Reimplemented from pPlotterLayer.

Definition at line 443 of file pGraphicalFunction.h.

References offsetPixelX.

00444         {
00445                 return offsetPixelX;
00446         }       

int pGraphicalFunction::getOffsetPixelsY (  )  [inline]

Gets the offset of the zoom in pixels

Definition at line 767 of file pGraphicalFunction.h.

References offsetPixelY.

Referenced by pPlotterWindow::onChangeActual(), pPlotterWindow::onMyZoomIn(), pPlotterWindow::onMyZoomOut(), and pPlotterWindow::onStartDrawing().

00768         {
00769                 return offsetPixelY;
00770         }

Here is the caller graph for this function:

virtual int pGraphicalFunction::getOffsetPixelsYv (  )  [inline, virtual]

Gets the offset of the zoom in pixels

Reimplemented from pPlotterLayer.

Definition at line 452 of file pGraphicalFunction.h.

References offsetPixelY.

00453         {
00454                 return offsetPixelY;
00455         }

virtual void pGraphicalFunction::getOffsets ( int &  offsetX,
int &  offSetY 
) [inline, virtual]

Get _offsetX and _offsetY

Reimplemented from pPlotterLayer.

Definition at line 117 of file pGraphicalFunction.h.

References _offsetX, _offsetY, and pPlotterLayer::offsetY.

00118         {
00119                 offsetX=(int)_offsetX;
00120                 offsetY=(int)_offsetY;
00121         }

double pGraphicalFunction::getOffsetX (  ) 

Definition at line 770 of file pGraphicalFunction.cxx.

References _offsetX.

Referenced by pPlotterWindow::onChangeActual(), pPlotterWindow::onMyZoomIn(), pPlotterWindow::onMyZoomOut(), and pPlotterWindow::onStartDrawing().

00771 {
00772         
00773         return this->_offsetX;
00774 }

Here is the caller graph for this function:

double pGraphicalFunction::getOffsetY (  ) 

Definition at line 782 of file pGraphicalFunction.cxx.

References _offsetY.

Referenced by pPlotterWindow::onChangeActual(), pPlotterWindow::onMyZoomIn(), pPlotterWindow::onMyZoomOut(), and pPlotterWindow::onStartDrawing().

00782                                        {
00783         return this->_offsetY;
00784 }

Here is the caller graph for this function:

const wxPen& mpLayer::GetPen (  )  const [inline, inherited]

Get pen set for this layer.

Returns:
Pen

Definition at line 180 of file mathplot.h.

00180 { return m_pen;  }

wxNode * pGraphicalFunction::GetPointAt ( int  movingPointIndex  ) 

Definition at line 110 of file pGraphicalFunction.cxx.

References logicFunction.

Referenced by HistogramWidget::getTransferenceFunctionPoint(), and pPlotterWindow::onMouseMove().

00111 {
00112         return logicFunction -> GetPointAt ( movingPointIndex );        
00113 }

Here is the caller graph for this function:

virtual void pGraphicalFunction::GetPoints ( wxList &  points  )  [inline, virtual]

Get Point list of the funcion

Parameters:
return points

Reimplemented from pPlotterLayer.

Definition at line 252 of file pGraphicalFunction.h.

References pLogicalFunction::GetPoints(), and logicFunction.

00253         {
00254                 logicFunction->GetPoints(points);
00255                 //points = realPoints;
00256         }  

Here is the call graph for this function:

virtual void pGraphicalFunction::getScales ( double &  scaleX,
double &  scaleY 
) [inline, virtual]

Let us know the scale of the function

Reimplemented from pPlotterLayer.

Definition at line 195 of file pGraphicalFunction.h.

References _scaleX, and _scaleY.

00196         {
00197                 scaleX=_scaleX;
00198                 scaleY=_scaleY;
00199         }

int pGraphicalFunction::getScaleWay (  ) 

Definition at line 620 of file pGraphicalFunction.cxx.

References scaleWay.

00621 {
00622  return scaleWay;
00623 }

double pGraphicalFunction::getScaleX (  ) 

Definition at line 700 of file pGraphicalFunction.cxx.

References _scaleX.

00701 {
00702         return this->_scaleX;
00703 }

double pGraphicalFunction::getScaleY (  ) 

Definition at line 711 of file pGraphicalFunction.cxx.

References _scaleY.

Referenced by pPlotter::GetValuesPointsFunction().

00711                                      {
00712         return this->_scaleY;
00713 }

Here is the caller graph for this function:

virtual void pGraphicalFunction::getScreens ( int &  scrX,
int &  scrY 
) [inline, virtual]

Get screens of the function

Reimplemented from pPlotterLayer.

Definition at line 177 of file pGraphicalFunction.h.

References screenX, and screenY.

00178         {
00179       scrX=screenX;
00180           scrY=screenY;
00181         }

int pGraphicalFunction::getScreenX (  ) 

Definition at line 633 of file pGraphicalFunction.cxx.

References screenX.

00634 {
00635   return this->screenX;
00636 }

int pGraphicalFunction::getScreenY (  ) 

Definition at line 641 of file pGraphicalFunction.cxx.

References screenY.

00642 {
00643   return this->screenY;
00644 }

bool pGraphicalFunction::getShowPoints (  ) 

Definition at line 68 of file pGraphicalFunction.cxx.

References showPointsF.

Referenced by pPlotterWindow::onChangeActual(), and pPlotterWindow::onStartDrawing().

00069 {
00070         return showPointsF;
00071 }

Here is the caller graph for this function:

virtual void pGraphicalFunction::getSize ( int &  size  )  [inline, virtual]

Get the number of points of the function

Reimplemented from pPlotterLayer.

Definition at line 272 of file pGraphicalFunction.h.

References getSizePoints().

00273         {
00274                 size=getSizePoints();
00275         }

Here is the call graph for this function:

int pGraphicalFunction::getSizePoints (  ) 
void pGraphicalFunction::GetSplinePoint ( double  t,
double &  x,
double &  y 
)

Definition at line 413 of file pGraphicalFunction.cxx.

References pLogicalFunction::getSizePoints(), logicFunction, xKSpline, and yKSpline.

Referenced by initializeSplineVectors().

00414         {
00415                 if (logicFunction->getSizePoints()==0)
00416                 {
00417                         x = 0;
00418                         y = 0;
00419                 }
00420                 if (logicFunction->getSizePoints()>=2)
00421                 {
00422                         x = xKSpline->Evaluate(t);
00423                         y = yKSpline->Evaluate(t);
00424                 }
00425         }

Here is the call graph for this function:

Here is the caller graph for this function:

double pGraphicalFunction::getStartX (  ) 

Definition at line 656 of file pGraphicalFunction.cxx.

References pLogicalFunction::getStartX(), and logicFunction.

00657 {
00658         return logicFunction->getStartX();
00659 }

Here is the call graph for this function:

double pGraphicalFunction::getStartY (  ) 

Definition at line 667 of file pGraphicalFunction.cxx.

References pLogicalFunction::getStartY(), and logicFunction.

00667                                      {
00668         return logicFunction->getStartY();
00669 }

Here is the call graph for this function:

int pGraphicalFunction::getType (  ) 

Definition at line 795 of file pGraphicalFunction.cxx.

References _type.

Referenced by pPlotterWindow::addFunction(), pPlotterWindow::onAddNewPoint(), pPlotterWindow::onAddPoint(), pPlotterWindow::onChangeActual(), pPlotterWindow::onDeletePoint(), pPlotterWindow::onMouseMove(), and pPlotter::update().

00795                                   {
00796         return this->_type;
00797 }

Here is the caller graph for this function:

int pGraphicalFunction::getValidPointRange (  ) 

Definition at line 802 of file pGraphicalFunction.cxx.

References validPointRange.

00803 {
00804         return validPointRange;
00805 }

double * pGraphicalFunction::getX_RealValues (  ) 

Evaluates if the given point belongs to the function. Returns the real x values of the control points of the function. It dont includes the points calculated by interpolation.

Definition at line 240 of file pGraphicalFunction.cxx.

References logicFunction.

Referenced by pPlotter::GetValuesPointsFunction().

00241 {
00242         return (logicFunction -> getX_RealValues( ));   
00243 }

Here is the caller graph for this function:

virtual std::vector<double> pGraphicalFunction::getXSpline (  )  [inline, virtual]

Reimplemented from pPlotterLayer.

Definition at line 426 of file pGraphicalFunction.h.

References xSpline.

00427         {
00428                 return xSpline;
00429         }

virtual int pGraphicalFunction::getXTraslation (  )  [inline, virtual]

Get the value of the traslation in the x-axis

Reimplemented from pPlotterLayer.

Definition at line 85 of file pGraphicalFunction.h.

References xTraslation.

00086         {
00087                 return xTraslation;
00088         }

double * pGraphicalFunction::getY_RealValues (  ) 

Returns the real y values of the control points of the function. It dont includes the points calculated by interpolation.

Definition at line 248 of file pGraphicalFunction.cxx.

References logicFunction.

Referenced by pPlotter::GetValuesPointsFunction().

00249 {  
00250 
00251         return (logicFunction -> getY_RealValues());    
00252 }

Here is the caller graph for this function:

virtual std::vector<double> pGraphicalFunction::getYSpline (  )  [inline, virtual]

Reimplemented from pPlotterLayer.

Definition at line 433 of file pGraphicalFunction.h.

References ySpline.

00434         {
00435                 return ySpline;
00436         }

int mpLayer::GetYTranslated ( double  sizey,
double  y 
) [inline, inherited]

Get the translation of the Y coordinate acoording to the new orientation of the axis du to the problem identified in MACOS with the funtion 'SetAxisOrientation'

Definition at line 201 of file mathplot.h.

Referenced by pPlotterLayer::draw(), pPlotterLayer::drawFunction(), pPlotterLayer::drawPoints(), pPlotterLayer::drawSplineCurve(), pPlotterScaleY::Plot(), pPlotterScaleX::Plot(), pPlotterLayer::Plot(), and mpScaleY::Plot().

00201                                                   {
00202                 return -y+sizey;
00203         }

Here is the caller graph for this function:

bool pGraphicalFunction::getZoomB (  )  [inline]

Definition at line 626 of file pGraphicalFunction.h.

References zoomIn.

00627         {
00628                 return zoomIn;
00629         }

virtual bool mpLayer::HasBBox (  )  [inline, virtual, inherited]

Check whether this layer has a bounding box. The default implementation returns TRUE. Overide and return FALSE if your mpLayer implementation should be ignored by the calculation of the global bounding box for all layers in a mpWindow.

Return values:
TRUE Has bounding box
FALSE Has not bounding box

Reimplemented in mpScaleX, mpScaleY, pPlotterScaleX, and pPlotterScaleY.

Definition at line 110 of file mathplot.h.

Referenced by mpWindow::UpdateBBox().

00110 { return TRUE; }

Here is the caller graph for this function:

virtual void pGraphicalFunction::ifShowPoints ( bool &  show  )  [inline, virtual]

Let us Know if the user want to see the points of the function of other color than the color of the lines

Reimplemented from pPlotterLayer.

Definition at line 216 of file pGraphicalFunction.h.

References showPointsF.

00217         {
00218                 show = showPointsF;
00219         }

bool pPlotterLayer::initializePolygon ( wxPoint *  points,
double  x1,
double  y1,
double  x2,
double  y2 
) [inherited]

Definition at line 192 of file pPlotterLayer.cxx.

Referenced by pPlotterLayer::drawFunction(), and pPlotterLayer::drawSplineCurve().

00193 {
00194         bool setted=false;
00195 
00196                 //intercepts
00197         float m=((float)(y2-y1))/(x2-x1);
00198         float x0=-y1/m+x1;
00199         float y0=-m*x1+y1;      
00200 
00201         if(points[0].x<=0&& points[1].x<=0 && points[0].y<=0&& points[1].y<=0)
00202         {
00203         
00204                 //int offsetpx=getOffsetPixelsXv(); //JPRx      
00205 
00206                 //analyzing the curve
00207 
00208                         if(x1<=0 && x2>=0)
00209                         {
00210                                 if(y2>=0 && y1>=0)
00211                                 {
00212                                                 //dc.DrawLine(0,y0, x2,y2);
00213                                                 points[0].x=0;
00214                                                 points[0].y=y0;
00215                                                 points[1].x=x2;
00216                                                 points[1].y=y2;
00217                                                 setted=true;                                    
00218                                         
00219                                 }
00220                                 else if(y2<=0 && y1>=0)
00221                                 {
00222                                         if(y0>=0 && x0>=0)
00223                                         {
00224                                                 //dc.DrawLine(0,y0,x0,0 );
00225                                                 points[0].x=0;
00226                                                 points[0].y=y0;
00227                                                 points[1].x=x0;
00228                                                 points[1].y=0;
00229                                                 setted=true;    
00230 
00231                                         }
00232                                                 
00233                                 }
00234                                 else if(y2>=0 && y1<=0)
00235                                 {       
00236                                         if(y0>=0) 
00237                                         {       
00238                                                 //dc.DrawLine(0,y0,x2,y2 );
00239                                                 points[0].x=0;
00240                                                 points[0].y=y0;
00241                                                 points[1].x=x2;
00242                                                 points[1].y=y2;
00243                                                 setted=true;    
00244                                         }
00245                                 }
00246                 
00247                         }
00248 
00249                         if(x1>=0 && x2>=0)
00250                         {
00251                                 if(y1>=0 && y2>=0 )
00252                                 {
00253                                         //dc.DrawLine(x1,y1, x2,y2);
00254                                         points[0].x=x1;
00255                                         points[0].y=y1;
00256                                         points[1].x=x2;
00257                                         points[1].y=y2;
00258                                         setted=true;    
00259                                 }
00260                                 else if(y1>=0 && y2<=0)
00261                                 {
00262                                         //dc.DrawLine(x1,y1,x0,0 );
00263                                         points[0].x=x1;
00264                                         points[0].y=y1;
00265                                         points[1].x=x0;
00266                                         points[1].y=0;
00267                                         setted=true;    
00268                                 }
00269                                 else if(y1<=0 && y2>=0) 
00270                                 {       
00271                                         //dc.DrawLine(x0,0,x2,y2);
00272                                         points[0].x=x0;
00273                                         points[0].y=0;
00274                                         points[1].x=x2;
00275                                         points[1].y=y2;
00276                                         setted=true;    
00277                                 }
00278                         }
00279                         else
00280                         return setted;
00281         }
00282         else
00283                 return setted;
00284         return setted; 
00285 }

Here is the caller graph for this function:

void pGraphicalFunction::initializeSplines (  ) 

Definition at line 359 of file pGraphicalFunction.cxx.

References addSplinesPoints(), xKSpline, and yKSpline.

Referenced by pPlotterWindow::addFunction(), and pPlotterWindow::onSplinePoints().

00360         {
00361                 if(xKSpline==NULL)
00362                         xKSpline = vtkKochanekSpline::New();
00363                 if(yKSpline==NULL)
00364                         yKSpline= vtkKochanekSpline::New();
00365                 addSplinesPoints();
00366 
00367         }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::initializeSplineVectors (  ) 

Definition at line 393 of file pGraphicalFunction.cxx.

References pLogicalFunction::getSizePoints(), GetSplinePoint(), logicFunction, xSpline, and ySpline.

Referenced by pPlotterWindow::addFunction(), pPlotterWindow::onAddNewPoint(), pPlotterWindow::onAddPoint(), pPlotterWindow::onChangeActual(), pPlotterWindow::onDeletePoint(), pPlotterWindow::onMouseMove(), pPlotterWindow::onSplinePoints(), and pPlotter::update().

00394         {
00395                 double x=0,y=0,t,delta;
00396                 int i,np,nps;
00397                 //realPoints.DeleteC  
00398 
00399                 np = logicFunction->getSizePoints();
00400                 nps = 200;
00401                 delta=( double ) ( np ) / ( double ) ( nps );
00402                 for( i = 0; i < nps; i++ )
00403                 {
00404                   t = delta * (double)i;
00405                   GetSplinePoint(t,x,y);
00406                   xSpline.push_back(x);
00407                   ySpline.push_back(y);
00408                 }
00409         }

Here is the call graph for this function:

Here is the caller graph for this function:

double pGraphicalFunction::interpolateY ( double  m,
int  x1,
int  y1,
int  x 
)

give us the value of y in the line define by the arguments

Definition at line 333 of file pGraphicalFunction.cxx.

00334 {
00335         return m*(x-x1)+y1;
00336 }

bool pGraphicalFunction::isInFunction ( int  x,
int  y 
)

Definition at line 262 of file pGraphicalFunction.cxx.

References getBefore(), and isInLine().

Referenced by pPlotterWindow::onChangeActual(), and pPlotterWindow::onMouseMove().

00263 {
00264         wxNode* before;
00265         wxNode* next;
00266         pFunctionPoint* point= new pFunctionPoint(x,y);
00267         bool inLine;
00268         before=getBefore(point);
00269 
00270         if(before && before->GetNext())
00271         {
00272                 next = before->GetNext();
00273                 //next = (before->GetNext())->GetNext();
00274                 inLine= isInLine((pFunctionPoint*)before->GetData(),(pFunctionPoint*)next->GetData(),point);
00275         }
00276         else 
00277                 inLine=false;
00278         return inLine;
00279 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool pGraphicalFunction::isInLine ( pFunctionPoint before,
pFunctionPoint next,
pFunctionPoint point 
)

Definition at line 311 of file pGraphicalFunction.cxx.

References pFunctionPoint::getRealX(), and pFunctionPoint::getRealY().

Referenced by isInFunction().

00312 {
00313         int x1,x2,x,y1,y2,y;
00314         
00315         x1=(float)before->getRealX();
00316         x2=(float)next->getRealX();
00317         y1=(float)before->getRealY();
00318         y2=(float)next->getRealY();
00319         x=(float)point->getRealX();
00320         y=(float)point->getRealY();
00321 
00322         
00323         float d1= (float)sqrt(pow(float(x1-x),2)+ pow(float(y1-y),2));
00324         float d2= (float)sqrt(pow(float(x2-x),2)+ pow(float(y2-y),2));
00325         float d=(float)sqrt(pow(float(x2-x1),2)+ pow(float(y2-y1),2));
00326         if(d1+d2<=(d*1.1) && d1<=d && d2<=d)
00327                 return true;
00328         return false;
00329 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::load ( wxString  fileName  ) 
bool pGraphicalFunction::orderPoints (  ) 
void pPlotterLayer::Plot ( wxDC &  dc,
mpWindow w 
) [virtual, inherited]

Layer plot handler. This implementation will plot the locus in the visible area and put a label according to the aligment specified.

Implements mpLayer.

Reimplemented in pPlotterScaleX, and pPlotterScaleY.

Definition at line 529 of file pPlotterLayer.cxx.

References pPlotterLayer::drawFunction(), pPlotterLayer::drawLineToMousePoint(), pPlotterLayer::drawPoints(), pPlotterLayer::drawSplineCurve(), pPlotterLayer::getDrawing(), pPlotterLayer::getFactorZoom(), pPlotterLayer::getIfActual(), pPlotterLayer::getMaxShowed(), pPlotterLayer::getMinShowed(), pPlotterLayer::getOffsetPixelsXv(), pPlotterLayer::getOffsets(), mpWindow::getRealGuideX(), mpWindow::getRealGuideY(), mpLayer::GetYTranslated(), pPlotterLayer::ifShowPoints(), mpLayer::m_pen, pPlotterLayer::offsetX, pPlotterLayer::offsetY, pPlotterLayer::scaleX, pPlotterLayer::scaleY, mpWindow::SetScaleX(), mpWindow::SetScaleY(), and pPlotterLayer::vGetType().

00530 {
00531         bool show,drawing,actual;
00532         int scrwX,scrwY,maxX,maxY,minX,minY,type;
00533         float factorZoom;
00534         
00535         ifShowPoints(show);
00536         getDrawing(drawing);
00537         type=vGetType();
00538         
00539         dc.SetPen( m_pen);
00540         
00541         /*
00542          * Managing the scale and zoom
00543          */
00544         
00545         dc.GetSize(&scrwX, &scrwY);
00546         
00547         getIfActual(actual);
00548         //getMax(maxX, maxY);
00549         /***********/
00550         getMaxShowed(maxX,maxY);
00551         getMinShowed(minX,minY);
00552         /***********/
00553         getFactorZoom(factorZoom);
00554         getOffsets(offsetX,offsetY);
00555         /*
00556         maxX=w.getMaxScrX();
00557         maxY=w.getMaxScrY();
00558         minX=w.getMinScrX();
00559         minY=w.getMinScrY();
00560         */
00561         if((maxX-minX)!=0 && (maxY-minY)!=0)
00562         {
00563                 
00564                 scaleX=(((double)scrwX-100)/(maxX-minX))*factorZoom;
00565                 scaleY=(((double)scrwY-50)/(maxY-minY))*factorZoom;
00566                 
00567                 if(actual)
00568                 {
00569                         w.SetScaleX(scaleX);
00570                         w.SetScaleY(scaleY);
00571                         //w.setMinScrX(offsetX);
00572                         //w.setMinScrY(offsetY);
00573                 }
00574                 
00575         }
00576         /*
00577                 Managing the drawing
00578         */
00579         int orgx=70;
00580 
00581         
00582 //EED 14Mai2009
00583 //      int orgy=w.GetScrY()-40;
00584 //      dc.SetDeviceOrigin( orgx ,orgy);
00585 //      dc.SetAxisOrientation(true,true);
00586         
00587         int orgy = 40;  
00588         //dc.SetDeviceOrigin( orgx ,orgy);
00589         dc.SetDeviceOrigin( orgx ,0);
00590         int sizedc = dc.GetSize().GetHeight()-orgy;
00591         //dc.SetAxisOrientation(true,false);
00592 
00593         
00594 
00595         //if the user dont want to see the points of the function and if he stops drawing
00596         //we have to draw the function
00597         if(!show && !drawing && type==1)
00598                 drawFunction(dc,w,orgy);
00599         else if(!show && !drawing && type==2)
00600                 drawSplineCurve(dc,w,orgy);
00601         //we just draw the point that the user just clicked
00602         else if(drawing && type==1)
00603         { 
00604                 drawFunction(dc,w,orgy);
00605                 drawLineToMousePoint(dc,w,orgy);
00606                 drawPoints(dc,w,orgy);
00607         }
00608         else if(drawing && type==1)
00609         {
00610                 drawSplineCurve(dc,w,orgy);
00611                 drawLineToMousePoint(dc,w,orgy);
00612                 drawPoints(dc,w,orgy);
00613         }
00614         else if(show && type==1)
00615         {
00616                 drawFunction(dc,w,orgy);
00617                 drawPoints(dc,w,orgy);
00618         }
00619         else if(show && type==2)
00620         {
00621                 drawSplineCurve(dc,w,orgy);
00622                 drawPoints(dc,w,orgy);
00623         }
00624 
00625         // Drawing the guides according to real values entered according to the integrated interaction (IS NOT WORKING!!!)
00626         if ( actual )
00627         {
00628                 dc.SetPen(wxPen(  wxColour(255,0,0),1,wxDOT ));
00629                 int offsetpx = getOffsetPixelsXv();
00630 //              int offsetpy = getOffsetPixelsYv();  //EED
00631 
00632                 int realX_guide = w.getRealGuideX();
00633                 if( realX_guide!=-1 )
00634                 {
00635                 dc.DrawLine( (realX_guide/*-w.getMinScrX()*/-offsetX)*scaleX + offsetpx, 
00636                         GetYTranslated(sizedc,0), 
00637                         (realX_guide/*-w.getMinScrX()*/-offsetX)*scaleX + offsetpx, 
00638                         GetYTranslated(sizedc,scrwY));                  
00639                 }
00640                         
00641                 int realY_guide = w.getRealGuideY();
00642                 if( realY_guide!=-1 )
00643                 {
00644                         dc.DrawLine( 0,
00645                                 GetYTranslated(sizedc,(realY_guide/*-w.getMinScrY()*/-offsetX)*scaleX + offsetpx), 
00646                                 scrwX, 
00647                                 GetYTranslated(sizedc,(realY_guide/*-w.getMinScrY()*/-offsetX)*scaleX + offsetpx));
00648                 }
00649         }
00650    
00651 }

Here is the call graph for this function:

virtual void pGraphicalFunction::Rewind (  )  [inline, virtual]

Rewind

Reimplemented from pPlotterLayer.

Definition at line 224 of file pGraphicalFunction.h.

References pLogicalFunction::GetPointAt(), logicFunction, and node.

00225         {
00226                                 
00227                 node = logicFunction->GetPointAt(0);
00228                 
00229         }

Here is the call graph for this function:

void pGraphicalFunction::save ( wxString  fileName  ) 

Definition at line 576 of file pGraphicalFunction.cxx.

References logicFunction, and pLogicalFunction::save().

Referenced by pPlotterWindow::onSave().

00577 {
00578         
00579         logicFunction->save(fileName);
00580 
00581 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setActual ( bool  act  ) 

actual

Definition at line 601 of file pGraphicalFunction.cxx.

References ifActual.

Referenced by HistogramWidget::drawTransferenceFunction(), pPlotterWindow::onLoad(), pPlotterWindow::onStartDrawing(), and pPlotterWindow::setActualFunction().

00602 {
00603   ifActual=act;
00604 }

Here is the caller graph for this function:

void pGraphicalFunction::setColorPoints ( std::vector< pColorPoint * > &  colorVector  ) 

Definition at line 825 of file pGraphicalFunction.cxx.

References f_colorPoints.

00826 {
00827         f_colorPoints.clear();
00828         int i = 0;      
00829         while(i<(int)(colorVector.size()))
00830         {
00831                 f_colorPoints.push_back(colorVector[i]);                
00832                 i++;
00833         }
00834 }

void pGraphicalFunction::SetDrawing ( bool  d  )  [inline]

Definition at line 544 of file pGraphicalFunction.h.

References drawing.

Referenced by pPlotterWindow::onLoad(), pPlotterWindow::onStartDrawing(), and pPlotterWindow::onStopDrawing().

00545         {
00546                 drawing = d;
00547         }

Here is the caller graph for this function:

void pGraphicalFunction::setEditable ( bool  edit  )  [inline]

Definition at line 607 of file pGraphicalFunction.h.

References editable.

Referenced by HistogramWidget::drawHistogram(), and Histogram::drawHistogram().

00608         {
00609                 editable=edit;
00610         }

Here is the caller graph for this function:

void pGraphicalFunction::setEndX ( double  aEndX  ) 

Definition at line 673 of file pGraphicalFunction.cxx.

References _endX, logicFunction, and pLogicalFunction::setEndX().

Referenced by setUp().

00674 {
00675         logicFunction->setEndX(aEndX);
00676         this->_endX = aEndX;
00677 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setEndY ( double  aEndY  ) 

Definition at line 683 of file pGraphicalFunction.cxx.

References _endY, logicFunction, and pLogicalFunction::setEndY().

Referenced by setUp().

00683                                              {
00684         logicFunction->setEndY(aEndY);
00685         this->_endY = aEndY;
00686 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setFactorZoom ( float  factor  )  [inline]

Definition at line 600 of file pGraphicalFunction.h.

References factorZoom.

Referenced by pPlotterWindow::onLoad(), pPlotterWindow::onMyZoomIn(), pPlotterWindow::onMyZoomOut(), and pPlotterWindow::onStartDrawing().

00601         {
00602                 factorZoom=factor;
00603         }

Here is the caller graph for this function:

void pGraphicalFunction::setFinalDrawPoint ( pFunctionPoint finalPoint  )  [inline]

Set the final drawing point

Parameters:
pFunctionPoint* finalPoint

Definition at line 658 of file pGraphicalFunction.h.

References finalDrawingPoint.

00659         {
00660                 finalDrawingPoint=finalPoint;   
00661         }

void mpLayer::SetFont ( wxFont &  font  )  [inline, inherited]

Set layer font

Parameters:
font Font, will be copied to internal class member

Definition at line 190 of file mathplot.h.

00190 { m_font = font; }

void pGraphicalFunction::setFromWindow ( bool  w  )  [inline]

set fromWindow: it is set to true if the function was created interactively

Definition at line 585 of file pGraphicalFunction.h.

References fromWindow.

Referenced by pPlotterWindow::onLoad(), and pPlotterWindow::onStartDrawing().

00586         {
00587                 fromWindow=w;
00588         }

Here is the caller graph for this function:

void pGraphicalFunction::setInitialDrawPoint ( pFunctionPoint initialPoint  )  [inline]

Set the initial drawing point

Parameters:
pFunctionPoint* initialPoint

Definition at line 642 of file pGraphicalFunction.h.

References initialDrawingPoint.

00643         {
00644                 initialDrawingPoint=initialPoint;       
00645         }

void pGraphicalFunction::setMaxShowedX ( int  msx  )  [inline]

Set the maxShowedX

Definition at line 738 of file pGraphicalFunction.h.

References maxShowedX.

Referenced by pPlotterWindow::actualizeViewRange(), pPlotterWindow::InitFunctionForVectors(), load(), pPlotterWindow::moveFunctions(), and pPlotterWindow::onStartDrawing().

00739         {
00740                 maxShowedX=msx;
00741         }

Here is the caller graph for this function:

void pGraphicalFunction::setMaxShowedY ( int  msy  )  [inline]

Set the minShowedY

Definition at line 745 of file pGraphicalFunction.h.

References maxShowedY.

Referenced by pPlotterWindow::InitFunctionForVectors(), load(), and pPlotterWindow::onStartDrawing().

00746         {
00747                 maxShowedY=msy;
00748         }

Here is the caller graph for this function:

void pGraphicalFunction::setMaxX ( double  aMaxX  ) 

Definition at line 740 of file pGraphicalFunction.cxx.

References _maxX, logicFunction, and pLogicalFunction::setMaxX().

Referenced by pPlotterWindow::onStartDrawing(), and setUp().

00741 {
00742         logicFunction->setMaxX(aMaxX);
00743         this->_maxX = aMaxX;
00744 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setMaxY ( double  aMaxY  ) 

Definition at line 751 of file pGraphicalFunction.cxx.

References _maxY, logicFunction, and pLogicalFunction::setMaxY().

Referenced by pPlotterWindow::onStartDrawing(), and setUp().

00752 {
00753         logicFunction->setMaxY(aMaxY);
00754         this->_maxY = aMaxY;
00755 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setMinShowed (  ) 

Definition at line 537 of file pGraphicalFunction.cxx.

References _offsetX, _offsetY, pLogicalFunction::GetPointAt(), pFunctionPoint::getRealX(), pFunctionPoint::getRealY(), logicFunction, node, setMinShowedX(), and setMinShowedY().

00538         {
00539                 bool firstX=false,firstY=false;
00540                 
00541                 wxNode* node=logicFunction->GetPointAt(0);
00542                 pFunctionPoint* p;
00543 
00544                 //float middleWX=(((float)(screenX-100))/2)/scaleX; // JPRx
00545                 //float middleWY=(((float)(screenY-50))/2)/scaleY; // JPRx
00546                 
00547                 //node=node->GetNext(); 
00548                 while(node)
00549                 {
00550                         p=(pFunctionPoint*)node->GetData();
00551                         int px=p->getRealX();
00552                         int py=p->getRealY();
00553                         int x=(px-_offsetX);//+middleWX;
00554                         int y=(py-_offsetY);//+middleWY;
00555                         if(!firstX && x>=0)
00556                         {
00557                                 firstX=true;
00558                                 setMinShowedX(px);
00559                         }
00560                         if(!firstY && y>=0)
00561                         {
00562                                 firstY=true;
00563                                 setMinShowedY(py);
00564                         }       
00565                         node=node->GetNext();
00566                 }
00567         }

Here is the call graph for this function:

void pGraphicalFunction::setMinShowedX ( int  msx  )  [inline]

Set the minShowedX

Definition at line 724 of file pGraphicalFunction.h.

References minShowedX.

Referenced by pPlotterWindow::actualizeViewRange(), pPlotterWindow::InitFunctionForVectors(), load(), pPlotterWindow::moveFunctions(), pPlotterWindow::onStartDrawing(), and setMinShowed().

00725         {
00726                 minShowedX=msx;
00727         }

Here is the caller graph for this function:

void pGraphicalFunction::setMinShowedY ( int  msy  )  [inline]

Set the minShowedY

Definition at line 731 of file pGraphicalFunction.h.

References minShowedY.

Referenced by pPlotterWindow::InitFunctionForVectors(), load(), pPlotterWindow::onStartDrawing(), and setMinShowed().

00732         {
00733                 minShowedY=msy;
00734         }

Here is the caller graph for this function:

void pGraphicalFunction::setMinX ( double  aMinX  ) 

Definition at line 717 of file pGraphicalFunction.cxx.

References _minX, logicFunction, and pLogicalFunction::setMinX().

Referenced by pPlotterWindow::onStartDrawing(), and setUp().

00718 {
00719         logicFunction->setMinX(aMinX);
00720         this->_minX = aMinX;
00721 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setMinY ( double  aMinY  ) 

Definition at line 728 of file pGraphicalFunction.cxx.

References _minY, logicFunction, and pLogicalFunction::setMinY().

Referenced by pPlotterWindow::onStartDrawing(), and setUp().

00729 {
00730         logicFunction->setMinY(aMinY);
00731         this->_minY = aMinY;
00732 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::SetMousePoint ( wxPoint  p  )  [inline]

Definition at line 555 of file pGraphicalFunction.h.

References mousePoint.

Referenced by pPlotterWindow::onMouseMove().

00556         { 
00557                 mousePoint = p;
00558         }

Here is the caller graph for this function:

void pGraphicalFunction::setmType ( int  mt  )  [inline]

Definition at line 802 of file pGraphicalFunction.h.

References mType.

Referenced by HistogramWidget::drawHistogram(), and Histogram::drawHistogram().

00803         {
00804                 mType=mt;
00805         }

Here is the caller graph for this function:

void mpLayer::SetName ( wxString  name  )  [inline, inherited]

Set layer name

Parameters:
name Name, will be copied to internal class member

Definition at line 185 of file mathplot.h.

00185 { m_name = name; }

void pGraphicalFunction::setOffsetPixelX ( int  offX  )  [inline]

Set the x-offset of the zoom

Definition at line 774 of file pGraphicalFunction.h.

References offsetPixelX.

Referenced by pPlotterWindow::onMyZoomIn(), pPlotterWindow::onMyZoomOut(), and setOffsets().

00775         {
00776                 offsetPixelX=offX;
00777         }

Here is the caller graph for this function:

void pGraphicalFunction::setOffsetPixelY ( int  offY  )  [inline]

Set the y-offset of the zoom

Definition at line 781 of file pGraphicalFunction.h.

References offsetPixelY.

Referenced by pPlotterWindow::onMyZoomIn(), pPlotterWindow::onMyZoomOut(), and setOffsets().

00782         {
00783                 offsetPixelY=offY;
00784         }       

Here is the caller graph for this function:

void pGraphicalFunction::setOffsets ( int  offx,
int  offy 
)

Definition at line 509 of file pGraphicalFunction.cxx.

References _offsetX, _offsetY, _scaleX, _scaleY, minShowedX, minShowedY, offsetPixelX, offsetPixelY, setOffsetPixelX(), setOffsetPixelY(), setOffsetX(), setOffsetY(), and setScales().

Referenced by pPlotterWindow::onMyZoomIn(), and pPlotterWindow::onMyZoomOut().

00510         {
00511                 int xS,yS;
00512 
00513                 setScales();
00514                 
00515                 xS=(offx-offsetPixelX)/_scaleX+_offsetX + minShowedX;
00516                 yS=(offy-offsetPixelY)/_scaleY+_offsetY+ minShowedY;
00517                 
00518                 setOffsetX(xS);
00519                 setOffsetY(yS);
00520                         
00521                 //setMinShowedX(xS);
00522                 //setMinShowedY(yS);
00523 
00524                 setOffsetPixelX(offx);
00525                 setOffsetPixelY(offy);
00526                 //setMinShowed();
00527         }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setOffsetX ( double  aOffsetX  ) 

Definition at line 764 of file pGraphicalFunction.cxx.

References _offsetX, logicFunction, and pLogicalFunction::setOffsetX().

Referenced by pPlotterWindow::actualizeViewRange(), pPlotterWindow::moveFunctions(), pPlotterWindow::onMyZoomIn(), pPlotterWindow::onMyZoomOut(), and setOffsets().

00765 {
00766         logicFunction->setOffsetX(aOffsetX);
00767         this->_offsetX = aOffsetX;
00768 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setOffsetY ( double  aOffsetY  ) 

Definition at line 776 of file pGraphicalFunction.cxx.

References _offsetY, logicFunction, and pLogicalFunction::setOffsetY().

Referenced by pPlotterWindow::onMyZoomIn(), pPlotterWindow::onMyZoomOut(), and setOffsets().

00777 {
00778         logicFunction->setOffsetY(aOffsetY);
00779         this->_offsetY = aOffsetY;
00780 }

Here is the call graph for this function:

Here is the caller graph for this function:

void mpLayer::SetPen ( wxPen &  pen  )  [inline, inherited]

Set layer pen

Parameters:
pen Pen, will be copied to internal class member

Definition at line 195 of file mathplot.h.

Referenced by HistogramWidget::drawHistogram(), Histogram::drawHistogram(), HistogramWidget::drawTransferenceFunction(), pPlotterWindow::onChangeColor(), pPlotterWindow::onLoad(), and pPlotterWindow::onStartDrawing().

00195 { m_pen  = pen;  }

Here is the caller graph for this function:

void pGraphicalFunction::setScales (  ) 

Definition at line 118 of file pGraphicalFunction.cxx.

References factorZoom, logicFunction, maxShowedX, maxShowedY, minShowedX, minShowedY, pPlotterLayer::scaleX, pPlotterLayer::scaleY, screenX, screenY, pLogicalFunction::setScaleX(), setScaleX(), pLogicalFunction::setScaleY(), and setScaleY().

Referenced by HistogramWidget::OnSize(), pPlotterWindow::setActualScales(), setOffsets(), and zooming().

00119 {
00120         //int dx= logicFunction->getMaxX()-logicFunction->getMinX();
00121         //int dy= logicFunction->getMaxY()-logicFunction->getMinY();
00122         int dx= maxShowedX-minShowedX;
00123         int dy= maxShowedY-minShowedY;
00124         
00125         
00126         if(dx!=0 && dy!=0)
00127         {
00128                 double scaleX=(((float)(screenX-100))/dx)*factorZoom;
00129                 double scaleY=(((float)(screenY-50))/dy)*factorZoom;
00130                 setScaleX(scaleX);
00131                 setScaleY(scaleY);
00132                 logicFunction->setScaleX(scaleX);
00133                 logicFunction->setScaleY(scaleY);
00134 
00135         }
00136 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setScaleWay ( int  typeS  ) 

SCALE WAY DEFECT_SCALE 1 MAX_SCALE 2 USER_SCALE 3

Definition at line 615 of file pGraphicalFunction.cxx.

References scaleWay.

Referenced by pPlotterWindow::onStartDrawing().

00616 {
00617   scaleWay=typeS;
00618 }

Here is the caller graph for this function:

void pGraphicalFunction::setScaleX ( double  aScaleX  ) 

Definition at line 694 of file pGraphicalFunction.cxx.

References _scaleX, logicFunction, and pLogicalFunction::setScaleX().

Referenced by setScales().

00695 {
00696         logicFunction->setScaleX(aScaleX);
00697         this->_scaleX = aScaleX;
00698 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setScaleY ( double  aScaleY  ) 

Definition at line 705 of file pGraphicalFunction.cxx.

References _scaleY, logicFunction, and pLogicalFunction::setScaleY().

Referenced by setScales().

00706 {
00707         logicFunction->setScaleY(aScaleY);
00708         this->_scaleY = aScaleY;
00709 }

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void pGraphicalFunction::setScreens ( int  scrX,
int  scrY 
) [inline, virtual]

Set screens value

Reimplemented from pPlotterLayer.

Definition at line 186 of file pGraphicalFunction.h.

References screenX, and screenY.

Referenced by HistogramWidget::OnSize(), and pPlotterWindow::setActualScales().

00187         {
00188                 screenX=scrX;
00189                 screenY=scrY;                   
00190         }

Here is the caller graph for this function:

void pGraphicalFunction::setScreenX ( int  scrX  ) 

Definition at line 629 of file pGraphicalFunction.cxx.

References screenX.

Referenced by pPlotterWindow::onMouseMove(), pPlotterWindow::onMyZoomIn(), and pPlotterWindow::onMyZoomOut().

00630 {
00631   this->screenX=scrX;
00632 }

Here is the caller graph for this function:

void pGraphicalFunction::setScreenY ( int  scrY  ) 

Definition at line 637 of file pGraphicalFunction.cxx.

References screenY.

Referenced by pPlotterWindow::onMouseMove(), pPlotterWindow::onMyZoomIn(), and pPlotterWindow::onMyZoomOut().

00638 {
00639   this->screenY=scrY;
00640 }

Here is the caller graph for this function:

void pGraphicalFunction::SetShowPoints ( bool  showPoints  ) 

Definition at line 63 of file pGraphicalFunction.cxx.

References showPointsF.

Referenced by HistogramWidget::drawTransferenceFunction(), pPlotterWindow::onNoShowPoints(), pPlotterWindow::onShowPoints(), and pPlotterWindow::onStartDrawing().

00064 {
00065         showPointsF = showPoints;
00066 }

Here is the caller graph for this function:

void pGraphicalFunction::setStartX ( double  aStartX  ) 

Definition at line 650 of file pGraphicalFunction.cxx.

References _startX, pLogicalFunction::getStartX(), logicFunction, and pLogicalFunction::setStartX().

Referenced by setUp().

00650                                                  {
00651         
00652         logicFunction->setStartX(aStartX);
00653         this->_startX =logicFunction->getStartX();
00654 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setStartY ( double  aStartY  ) 

Definition at line 661 of file pGraphicalFunction.cxx.

References _startY, logicFunction, and pLogicalFunction::setStartY().

Referenced by setUp().

00662 {
00663         logicFunction->setStartY(aStartY);
00664         this->_startY = aStartY;
00665 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setType ( int  aType  ) 

Definition at line 789 of file pGraphicalFunction.cxx.

References _type, logicFunction, and pLogicalFunction::setType().

Referenced by HistogramWidget::drawHistogram(), Histogram::drawHistogram(), HistogramWidget::drawTransferenceFunction(), pPlotterWindow::onLine(), and pPlotterWindow::onSplinePoints().

00790 {
00791         logicFunction->setType(aType);
00792         this->_type = aType;
00793 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pGraphicalFunction::setUp (  ) 
void pGraphicalFunction::setValidPointRange ( int  theRange  ) 

Definition at line 807 of file pGraphicalFunction.cxx.

References logicFunction, pLogicalFunction::setValidPointRange(), and validPointRange.

00808 {
00809         logicFunction->setValidPointRange(theRange);
00810         validPointRange = theRange;
00811 }

Here is the call graph for this function:

void pGraphicalFunction::setXTraslation ( int  xT  )  [inline]

Set the value of the traslation in the x-axis

Parameters:
xT value in pixels of the traslation in x-axis

Definition at line 814 of file pGraphicalFunction.h.

References xTraslation.

00815         {
00816                  xTraslation=xT;
00817         }

void pGraphicalFunction::setZoomIn ( bool  z  )  [inline]

Definition at line 634 of file pGraphicalFunction.h.

References zoomIn.

00635         {
00636                 zoomIn=z;
00637         }

int pGraphicalFunction::validPointOnFunction ( wxPoint  realPoint  ) 

Definition at line 93 of file pGraphicalFunction.cxx.

References logicFunction.

Referenced by pPlotterWindow::onAddPoint(), pPlotterWindow::onDeletePoint(), and pPlotterWindow::onMouseMove().

00094 {
00095         return (logicFunction -> validPointOnFunction (realPoint));
00096 }

Here is the caller graph for this function:

virtual int pGraphicalFunction::vGetType (  )  [inline, virtual]

Get the type of the curve 1=piecewise functio 2= smooth

Reimplemented from pPlotterLayer.

Definition at line 108 of file pGraphicalFunction.h.

References _type.

00109         {
00110                 return _type;
00111         }

void pGraphicalFunction::zooming ( int  clickedX,
int  clickedY,
int  width 
)

This method set the initial point and the final point of drawing according with the width of the square around the point clicked

Parameters:
clickedX 
clickedY 
width,: width of the square

This method set the initial point and the final point of drawing according with the width of the square around the point clicked

Parameters:
clickedX 
clickedY 
width,: width of the square Note: all the parameters are pixels Pre: screenX, screenY, zoom are set! with the actual data. DEPRECATED!

Definition at line 441 of file pGraphicalFunction.cxx.

References _offsetX, _offsetY, _scaleX, _scaleY, finalDrawingPoint, pLogicalFunction::GetPointAt(), pFunctionPoint::getRealX(), pFunctionPoint::getRealY(), getSizePoints(), initialDrawingPoint, logicFunction, setScales(), and zoomIn.

00442 {
00443         int xS,yS,x1,x2,y1,y2;
00444         setScales();
00445         xS=clickedX/_scaleX+_offsetX;
00446         yS=clickedY/_scaleY+_offsetY;
00447         //square
00448         x1=(clickedX-width)/_scaleX+_offsetX;
00449         x2=(clickedX+width)/_scaleX+_offsetX;
00450         y1=(clickedY-width)/_scaleY+_offsetY;
00451         y2=(clickedY+width)/_scaleY+_offsetY;
00452 
00453         int numberPoints=getSizePoints();
00454         pFunctionPoint* point;
00455         wxNode* p;
00456         bool inSquare=false,first=false;
00457         
00458         //if the user made a zoom
00459         if(zoomIn)
00460         {
00461                 int i;
00462                 for(i=0; i<numberPoints;i++)
00463                 {
00464                         p=logicFunction->GetPointAt(i);
00465                         point=(pFunctionPoint*)p->GetData();
00466                         int rx=point->getRealX();
00467                         int ry=point->getRealY();
00468                         inSquare= rx>=x1 && rx<=x2; //&& ry>=y1 && ry<=y2;
00469                         if(inSquare)
00470                         {
00471                                 if(!first)
00472                                 {
00473                                         initialDrawingPoint=point;
00474                                         _offsetX=rx;
00475                                         _offsetY=ry;
00476                                         first=true;
00477                                 }
00478                                 finalDrawingPoint=point;
00479                         }
00480                 }
00481         }       
00482         else
00483         {
00484                 //We extend the range of vision in x and y,20 and 10 respectively
00485                 if((_offsetX-20)>=0)
00486                 {
00487                         _offsetX=_offsetX-20;
00488                 }
00489                 else
00490                         _offsetX=0;
00491                 if((_offsetY-10)>=0)
00492                 {
00493                         _offsetY=_offsetY-10;
00494                 }
00495                 else
00496                         _offsetY=0;
00497         }
00498 }

Here is the call graph for this function:


Member Data Documentation

double pGraphicalFunction::_endX [private]

Is the last discrete point on x axis of the drawed function.

Definition at line 843 of file pGraphicalFunction.h.

Referenced by setEndX().

double pGraphicalFunction::_endY [private]

Is the last discrete point on y axis of the drawed function.

Definition at line 847 of file pGraphicalFunction.h.

Referenced by setEndY().

double pGraphicalFunction::_maxX [private]

Is the maximun x-real value reacheable by the function.

Definition at line 867 of file pGraphicalFunction.h.

Referenced by setMaxX().

double pGraphicalFunction::_maxY [private]

Is the maximun y-real value reacheable by the function.

Definition at line 871 of file pGraphicalFunction.h.

Referenced by setMaxY().

double pGraphicalFunction::_minX [private]

Is the minimun x-real value reacheable by the function.

Definition at line 859 of file pGraphicalFunction.h.

Referenced by setMinX().

double pGraphicalFunction::_minY [private]

Is the minimun y-real value reacheable by the function.

Definition at line 863 of file pGraphicalFunction.h.

Referenced by setMinY().

double pGraphicalFunction::_offsetX [private]

Is the logical x-offset of the drawed function.

Definition at line 875 of file pGraphicalFunction.h.

Referenced by getOffsets(), getOffsetX(), setMinShowed(), setOffsets(), setOffsetX(), and zooming().

double pGraphicalFunction::_offsetY [private]

Is the logical y-offset of the drawed function.

Definition at line 879 of file pGraphicalFunction.h.

Referenced by getOffsets(), getOffsetY(), setMinShowed(), setOffsets(), setOffsetY(), and zooming().

double pGraphicalFunction::_scaleX [private]

Is the x-scale percentage according to the context device.

Definition at line 851 of file pGraphicalFunction.h.

Referenced by getScales(), getScaleX(), setOffsets(), setScaleX(), and zooming().

double pGraphicalFunction::_scaleY [private]

Is the y-scale percentage according to the context device.

Definition at line 855 of file pGraphicalFunction.h.

Referenced by getScales(), getScaleY(), setOffsets(), setScaleY(), and zooming().

double pGraphicalFunction::_startX [private]

Is the initial discrete point on x axis of the drawed function.

Definition at line 835 of file pGraphicalFunction.h.

Referenced by setStartX().

double pGraphicalFunction::_startY [private]

Is the initial discrete point on y axis of the drawed function.

Definition at line 839 of file pGraphicalFunction.h.

Referenced by setStartY().

Is the way of how points are going to be connected. It could be smooth, line.

Definition at line 883 of file pGraphicalFunction.h.

Referenced by getType(), setType(), and vGetType().

Indicates if the user is drawing the function

Definition at line 905 of file pGraphicalFunction.h.

Referenced by GetDrawing(), getDrawing(), and SetDrawing().

The function is editable

Definition at line 947 of file pGraphicalFunction.h.

Referenced by getEditable(), and setEditable().

Definition at line 891 of file pGraphicalFunction.h.

Referenced by getColorPoints(), and setColorPoints().

factorZoom

Definition at line 943 of file pGraphicalFunction.h.

Referenced by getFactorZoom(), setFactorZoom(), and setScales().

final drawing point

Definition at line 959 of file pGraphicalFunction.h.

Referenced by getFinallDrawPoint(), setFinalDrawPoint(), and zooming().

if the function comes from window

Definition at line 939 of file pGraphicalFunction.h.

Referenced by AddNewPoint(), AddPoint(), changePoint(), DeletePoint(), deletePointAt(), getFromWindow(), getFromWindowV(), and setFromWindow().

if is the actual

Definition at line 925 of file pGraphicalFunction.h.

Referenced by getActual(), getIfActual(), and setActual().

initial drawing point

Definition at line 955 of file pGraphicalFunction.h.

Referenced by getInitialDrawPoint(), setInitialDrawPoint(), and zooming().

int pPlotterLayer::m_flags [protected, inherited]

Holds label alignment.

Definition at line 224 of file pPlotterLayer.h.

wxFont mpLayer::m_font [protected, inherited]
wxString mpLayer::m_name [protected, inherited]

Layer's name.

Definition at line 208 of file mathplot.h.

Referenced by mpScaleY::Plot(), mpScaleX::Plot(), mpFXY::Plot(), mpFY::Plot(), and mpFX::Plot().

wxPen mpLayer::m_pen [protected, inherited]

Maximum point showed to the user (zoom)X

Definition at line 969 of file pGraphicalFunction.h.

Referenced by getMaxXShowed(), setMaxShowedX(), and setScales().

Maximum point showed to the user (zoom)X

Definition at line 979 of file pGraphicalFunction.h.

Referenced by getMaxYShowed(), setMaxShowedY(), and setScales().

Minimum point showed to the user (zoom)X

Definition at line 964 of file pGraphicalFunction.h.

Referenced by getMinXShowed(), setMinShowedX(), setOffsets(), and setScales().

Minimum point showed to the user (zoom)Y

Definition at line 974 of file pGraphicalFunction.h.

Referenced by getMinYShowed(), setMinShowedY(), setOffsets(), and setScales().

wxPoint pGraphicalFunction::mousePoint [private]

this is for the graphical function Mouse Point

Definition at line 911 of file pGraphicalFunction.h.

Referenced by getMousePoint(), and SetMousePoint().

Definition at line 1009 of file pGraphicalFunction.h.

Referenced by getmType(), and setmType().

wxNode* pGraphicalFunction::node [private]

node of the realPoints where are we

Definition at line 896 of file pGraphicalFunction.h.

Referenced by addSplinesPoints(), getBefore(), GetNextXY(), Rewind(), and setMinShowed().

offset in pixels where the user has clicked before changing the scale

Definition at line 1001 of file pGraphicalFunction.h.

Referenced by getOffsetPixelsX(), getOffsetPixelsXv(), setOffsetPixelX(), and setOffsets().

int pPlotterLayer::offsetX [protected, inherited]
int pPlotterLayer::offsetY [protected, inherited]
wxList pPlotterLayer::points [protected, inherited]

The list of the function points

Definition at line 887 of file pGraphicalFunction.h.

the way we scale DEFECT_SCALE 1 MAX_SCALE 2 USER_SCALE 3

Definition at line 934 of file pGraphicalFunction.h.

Referenced by getScaleWay(), and setScaleWay().

double pPlotterLayer::scaleX [protected, inherited]
double pPlotterLayer::scaleY [protected, inherited]

The size of the screen in X

Definition at line 916 of file pGraphicalFunction.h.

Referenced by getScreens(), getScreenX(), setScales(), setScreens(), and setScreenX().

The size of the screen in Y

Definition at line 921 of file pGraphicalFunction.h.

Referenced by getScreens(), getScreenY(), setScales(), setScreens(), and setScreenY().

If the function has to showpoints

Definition at line 830 of file pGraphicalFunction.h.

Referenced by getShowPoints(), ifShowPoints(), and SetShowPoints().

Number that determines the radius range for the valid area the point (sensible radius). Default value 5.

Definition at line 900 of file pGraphicalFunction.h.

Referenced by getValidPointRange(), and setValidPointRange().

vtkKochanekSpline* pGraphicalFunction::xKSpline [private]

Definition at line 992 of file pGraphicalFunction.h.

Referenced by addSplinesPoints(), GetSplinePoint(), and initializeSplines().

std::vector<double> pGraphicalFunction::xSpline [private]

Definition at line 985 of file pGraphicalFunction.h.

Referenced by clearSplineVectors(), getXSpline(), and initializeSplineVectors().

Definition at line 1014 of file pGraphicalFunction.h.

Referenced by getXTraslation(), and setXTraslation().

vtkKochanekSpline* pGraphicalFunction::yKSpline [private]

Definition at line 994 of file pGraphicalFunction.h.

Referenced by addSplinesPoints(), GetSplinePoint(), and initializeSplines().

std::vector<double> pGraphicalFunction::ySpline [private]

Definition at line 987 of file pGraphicalFunction.h.

Referenced by clearSplineVectors(), getYSpline(), and initializeSplineVectors().

if the user did a zoom in/out

Definition at line 951 of file pGraphicalFunction.h.

Referenced by getZoomB(), setZoomIn(), and zooming().


The documentation for this class was generated from the following files:

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1