Author: gedmurphy Date: Sat Jun 6 17:08:22 2009 New Revision: 41298
URL: http://svn.reactos.org/svn/reactos?rev=41298&view=rev Log: Keep the horizontal grid axis consistent
Modified: trunk/reactos/base/applications/taskmgr/graphctl.c
Modified: trunk/reactos/base/applications/taskmgr/graphctl.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/g... ============================================================================== --- trunk/reactos/base/applications/taskmgr/graphctl.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/taskmgr/graphctl.c [iso-8859-1] Sat Jun 6 17:08:22 2009 @@ -191,7 +191,7 @@ /* to a bitmap. The result is then BitBlt'd to the control whenever needed. */ int i; int nCharacters; - int nTopGridPix, nMidGridPix, nBottomGridPix; + //int nTopGridPix, nMidGridPix, nBottomGridPix;
HPEN oldPen; HPEN solidPen = CreatePen(PS_SOLID, 0, this->m_crGridColor); @@ -250,19 +250,15 @@ LineTo(this->m_dcGrid, this->m_rectPlot.left, this->m_rectPlot.bottom+1); /* LineTo(m_dcGrid, m_rectPlot.left, m_rectPlot.top); */
- /* draw the horizontal and vertical axis */ - nMidGridPix = (this->m_rectPlot.top + this->m_rectPlot.bottom)/2; - nTopGridPix = nMidGridPix - this->m_nPlotHeight/4; - nBottomGridPix = nMidGridPix + this->m_nPlotHeight/4; - - MoveToEx(this->m_dcGrid, this->m_rectPlot.left, nTopGridPix, NULL); - LineTo(this->m_dcGrid, this->m_rectPlot.right, nTopGridPix); - MoveToEx(this->m_dcGrid, this->m_rectPlot.left, nMidGridPix, NULL); - LineTo(this->m_dcGrid, this->m_rectPlot.right, nMidGridPix); - MoveToEx(this->m_dcGrid, this->m_rectPlot.left, nBottomGridPix, NULL); - LineTo(this->m_dcGrid, this->m_rectPlot.right, nBottomGridPix); - - for (i = this->m_rectPlot.left; i<this->m_rectPlot.right; i+=13) + /* draw the horizontal axis */ + for (i = this->m_rectPlot.top; i < this->m_rectPlot.bottom; i += 12) + { + MoveToEx(this->m_dcGrid, this->m_rectPlot.left, this->m_rectPlot.top + i, NULL); + LineTo(this->m_dcGrid, this->m_rectPlot.right, this->m_rectPlot.top + i); + } + + /* draw the vertical axis */ + for (i = this->m_rectPlot.left; i < this->m_rectPlot.right; i += 12) { MoveToEx(this->m_dcGrid, this->m_rectPlot.left + i, this->m_rectPlot.bottom, NULL); LineTo(this->m_dcGrid, this->m_rectPlot.left + i, this->m_rectPlot.top);