]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterLayer.cxx
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / pPlotter / pPlotterLayer.cxx
index a1a04ef1ad2d68ba42378344aac53dc7faab5687..37c7ba27e888de661a642d41591f83af455fd833 100644 (file)
@@ -93,7 +93,7 @@ void pPlotterLayer::drawSplineCurve(wxDC & dc,mpWindow & w)
        std::vector<double> vy=getYSpline();
        wxPoint* ppoints;
        
-       int counter=0,minX,maxX,minY,maxY;
+       int /*counter=0,*/ minX,maxX,minY,maxY; // JPRx
        /*
        This is the offset of every point scale to the window
        pixel
@@ -182,7 +182,7 @@ void pPlotterLayer::drawSplineCurve(wxDC & dc,mpWindow & w)
 
 /*
  it define the first point of the polygon for be drawing
- returs true if the first and second point of the polygon are setted
+ returns true if the first and second point of the polygon are set
 */
 bool pPlotterLayer::initializePolygon(wxPoint* points,double x1, double y1,double x2, double y2)
 {
@@ -196,7 +196,7 @@ bool pPlotterLayer::initializePolygon(wxPoint* points,double x1, double y1,doubl
        if(points[0].x<=0&& points[1].x<=0 && points[0].y<=0&& points[1].y<=0)
        {
        
-               int offsetpx=getOffsetPixelsXv();       
+               //int offsetpx=getOffsetPixelsXv(); //JPRx      
 
                //analyzing the curve
 
@@ -276,10 +276,11 @@ bool pPlotterLayer::initializePolygon(wxPoint* points,double x1, double y1,doubl
        }
        else
                return setted;
+       return setted; 
 }
 
 /**
-* Draw le lines between the points of the function
+* Draw the lines between the points of the function
 */
 void pPlotterLayer::drawFunction(wxDC & dc,mpWindow & w)
 {
@@ -293,12 +294,10 @@ void pPlotterLayer::drawFunction(wxDC & dc,mpWindow & w)
        pixel
        */
        offsetpx=getOffsetPixelsXv();
-       offsetpy=getOffsetPixelsYv();
-       
+       offsetpy=getOffsetPixelsYv();   
 
        Rewind();
        
-
        dc.GetSize(&scrwX, &scrwY);
        
        //Lines between the points
@@ -313,15 +312,15 @@ void pPlotterLayer::drawFunction(wxDC & dc,mpWindow & w)
        /***********/
 
        //traslation
-       int xTraslation=getXTraslation();
+       //int xTraslation=getXTraslation(); //JPRx
        wxNode* node= points.GetFirst();
-       int i=1;//points.GetCount()+1;
+       // int i=1;//points.GetCount()+1; //JPRx
        int j=2;
        /*
         Fill it if it is an histogram
        */
        wxPoint point;
-       pFunctionPoint* pointk;
+       // pFunctionPoint* pointk; //JPRx
        if(type==2)
        {
                /*
@@ -418,7 +417,7 @@ void pPlotterLayer::drawPoints(wxDC & dc,mpWindow & w)
        int offsetpx=getOffsetPixelsXv();
        int offsetpy=getOffsetPixelsYv();
        //traslation
-       int xTraslation=getXTraslation();
+//     int xTraslation=getXTraslation();  //EED
        /*wxPen mypen(*wxBLACK, 5, wxSOLID);
        dc.SetPen(mypen);*/
        /***********/
@@ -479,7 +478,7 @@ void pPlotterLayer::drawLineToMousePoint(wxDC & dc,mpWindow & w)
        getMinShowed(minX,minY);
        /***********/
        //traslation
-       int xTraslation=getXTraslation();
+//     int xTraslation=getXTraslation(); //EED
        
        if(node)
        {
@@ -569,10 +568,18 @@ void pPlotterLayer::Plot(wxDC & dc, mpWindow & w)
                Managing the drawing
        */
        int orgx=70;
-       int orgy=w.GetScrY()-40;
+
+       
+//EED 14Mai2009
+//     int orgy=w.GetScrY()-40;
+//     dc.SetDeviceOrigin( orgx ,orgy);
+//     dc.SetAxisOrientation(true,true);
+       
+       int orgy = 40;  
        dc.SetDeviceOrigin( orgx ,orgy);
-       dc.SetAxisOrientation(true,true);
+       dc.SetAxisOrientation(true,false);
 
+       
 
        //if the user dont want to see the points of the function and if he stops drawing
        //we have to draw the function
@@ -609,7 +616,7 @@ void pPlotterLayer::Plot(wxDC & dc, mpWindow & w)
        {
                dc.SetPen(wxPen(  wxColour(255,0,0),1,wxDOT ));
                int offsetpx = getOffsetPixelsXv();
-               int offsetpy = getOffsetPixelsYv();
+//             int offsetpy = getOffsetPixelsYv();  //EED
 
                int realX_guide = w.getRealGuideX();
                if( realX_guide!=-1 )