]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mathplot.cxx
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / pPlotter / mathplot.cxx
index bda190264c79f3ae16cc2d5795fb7b1485a80a01..4b37ef916bcf6c4722029202a8758f120a407f1a 100644 (file)
@@ -440,7 +440,7 @@ void mpWindow::Fit()
        {
                int cx, cy;
                GetClientSize( &cx, &cy);
-
+               
                double d;
                d = m_maxX - m_minX;
                if (d!=0)
@@ -562,6 +562,7 @@ void mpWindow::OnPaint( wxPaintEvent &event )
 {
        wxPaintDC dc(this);
        dc.GetSize(&m_scrX, &m_scrY);
+printf("EED mpWindow::OnPaint %d %d\n",m_scrX,m_scrY);
 
        //m_scrX=200;
        //m_scrY=200;
@@ -589,7 +590,14 @@ void mpWindow::OnPaint( wxPaintEvent &event )
        //dc.SetDeviceOrigin(70,40);
        //dc.SetAxisOrientation(false,true);
        temp_dc.SetAxisOrientation(true,false);
-       dc.Blit(0,0, m_scrX, m_scrY, &temp_dc,-70,-m_scrY+40);
+       
+       //EED 14mai2009
+       //dc.Blit(0,0, m_scrX, m_scrY, &temp_dc,-70,-m_scrY+40);
+       
+       temp_dc.SetDeviceOrigin(0,0);
+       dc.Blit(0,0, m_scrX, m_scrY, &temp_dc,0,0);
+       
+       
        delete _bitmap_functions; 
        //_bitmap_functions
        //dc.SetAxisOrientation(false,true);
@@ -688,17 +696,18 @@ bool mpWindow::UpdateBBox()
        return first == FALSE;
 }
 
-void mpWindow :: UpdateAll()
+void mpWindow::UpdateAll()
 {
        if (UpdateBBox())
        {
                int cx, cy;
                GetClientSize( &cx, &cy);
+printf("EED mpWindow::UpdateAll %d %d\n",cx,cy);
 
-               const int sx = (int)((m_maxX - m_minX) * GetScaleX());
-               const int sy = (int)((m_maxY - m_minY) * GetScaleY());
-               const int px = (int)((GetPosX() - m_minX) * GetScaleX() - (cx>>1));
-               const int py = (int)((GetPosY() - m_minY) * GetScaleY() - (cy>>1));
+               //const int sx = (int)((m_maxX - m_minX) * GetScaleX()); // JPRx
+               //const int sy = (int)((m_maxY - m_minY) * GetScaleY()); // JPRx
+               //const int px = (int)((GetPosX() - m_minX) * GetScaleX() - (cx>>1)); // JPRx
+               //const int py = (int)((GetPosY() - m_minY) * GetScaleY() - (cy>>1)); // JPRx
                //SetScrollbars( 1, 1, sx, sy, px, py);
        }