[ros-diffs] [gedmurphy] 41260: Make the horizontal and vertical axis in the history graphs solid lines instead of the dotted 80's style we had.

gedmurphy at svn.reactos.org gedmurphy at svn.reactos.org
Tue Jun 2 21:09:04 CEST 2009


Author: gedmurphy
Date: Tue Jun  2 23:09:03 2009
New Revision: 41260

URL: http://svn.reactos.org/svn/reactos?rev=41260&view=rev
Log:
Make the horizontal and vertical axis in the history graphs solid lines instead of the dotted 80's style we had.

Modified:
    trunk/reactos/base/applications/taskmgr/graphctl.c
    trunk/reactos/base/applications/taskmgr/perfpage.c

Modified: trunk/reactos/base/applications/taskmgr/graphctl.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/graphctl.c?rev=41260&r1=41259&r2=41260&view=diff
==============================================================================
--- trunk/reactos/base/applications/taskmgr/graphctl.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/taskmgr/graphctl.c [iso-8859-1] Tue Jun  2 23:09:03 2009
@@ -77,7 +77,7 @@
     /*  background, grid and data colors */
     /*  these are public variables and can be set directly */
     this->m_crBackColor = RGB(  0,   0,   0);  /*  see also SetBackgroundColor */
-    this->m_crGridColor = RGB(  0, 255, 255);  /*  see also SetGridColor */
+    this->m_crGridColor = RGB(  0, 128, 64);  /*  see also SetGridColor */
     this->m_crPlotColor[0] = RGB(255, 255, 255);  /*  see also SetPlotColor */
     this->m_crPlotColor[1] = RGB(100, 255, 255);  /*  see also SetPlotColor */
     this->m_crPlotColor[2] = RGB(255, 100, 255);  /*  see also SetPlotColor */
@@ -189,7 +189,7 @@
     /*  There is a lot of drawing going on here - particularly in terms of  */
     /*  drawing the grid.  Don't panic, this is all being drawn (only once) */
     /*  to a bitmap.  The result is then BitBlt'd to the control whenever needed. */
-    int i, j;
+    int i;
     int nCharacters;
     int nTopGridPix, nMidGridPix, nBottomGridPix;
 
@@ -249,33 +249,27 @@
     LineTo(this->m_dcGrid, this->m_rectPlot.right+1, this->m_rectPlot.bottom+1);
     LineTo(this->m_dcGrid, this->m_rectPlot.left, this->m_rectPlot.bottom+1);
     /*   LineTo(m_dcGrid, m_rectPlot.left, m_rectPlot.top); */
-    SelectObject(this->m_dcGrid, oldPen);
-    DeleteObject(solidPen);
-
-    /*  draw the dotted lines,
-     *  use SetPixel instead of a dotted pen - this allows for a
-     *  finer dotted line and a more "technical" look
-     */
+
+    /*  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;
 
-    for (i=this->m_rectPlot.left; i<this->m_rectPlot.right; i+=2)
-    {
-        SetPixel(this->m_dcGrid, i, nTopGridPix,    this->m_crGridColor);
-        SetPixel(this->m_dcGrid, i, nMidGridPix,    this->m_crGridColor);
-        SetPixel(this->m_dcGrid, i, nBottomGridPix, this->m_crGridColor);
-    }
-
-    for (i=this->m_rectPlot.left; i<this->m_rectPlot.right; i+=10)
-    {
-        for (j=this->m_rectPlot.top; j<this->m_rectPlot.bottom; j+=2)
-        {
-            SetPixel(this->m_dcGrid, i, j, this->m_crGridColor);
-            /*       SetPixel(m_dcGrid, i, j, m_crGridColor); */
-            /*       SetPixel(m_dcGrid, i, j, m_crGridColor); */
-        }
-    }
+    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)
+    {
+        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);
+    }
+
+    SelectObject(this->m_dcGrid, oldPen);
+    DeleteObject(solidPen);
 
 #if 0
     /*  create some fonts (horizontal and vertical) */

Modified: trunk/reactos/base/applications/taskmgr/perfpage.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/perfpage.c?rev=41260&r1=41259&r2=41260&view=diff
==============================================================================
--- trunk/reactos/base/applications/taskmgr/perfpage.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/taskmgr/perfpage.c [iso-8859-1] Tue Jun  2 23:09:03 2009
@@ -178,7 +178,7 @@
 /*         PerformancePageCpuUsageHistoryGraph.SetGridColor(RGB(192, 192, 255)) ; */
 /*         PerformancePageCpuUsageHistoryGraph.SetPlotColor(RGB(255, 255, 255)) ; */
         GraphCtrl_SetBackgroundColor(&PerformancePageCpuUsageHistoryGraph, RGB(0, 0, 0)) ;
-        GraphCtrl_SetGridColor(&PerformancePageCpuUsageHistoryGraph, RGB(152, 205, 152)) ;
+        GraphCtrl_SetGridColor(&PerformancePageCpuUsageHistoryGraph, RGB(0, 128, 64));
 
         GraphCtrl_SetPlotColor(&PerformancePageCpuUsageHistoryGraph, 0, RGB(0, 255, 0)) ;
         GraphCtrl_SetPlotColor(&PerformancePageCpuUsageHistoryGraph, 1, RGB(255, 0, 0)) ;
@@ -188,7 +188,7 @@
         GraphCtrl_Create(&PerformancePageMemUsageHistoryGraph, hPerformancePageMemUsageHistoryGraph, hDlg, IDC_MEM_USAGE_HISTORY_GRAPH);
         GraphCtrl_SetRange(&PerformancePageMemUsageHistoryGraph, 0.0, 100.0, 10) ;
         GraphCtrl_SetBackgroundColor(&PerformancePageMemUsageHistoryGraph, RGB(0, 0, 0)) ;
-        GraphCtrl_SetGridColor(&PerformancePageMemUsageHistoryGraph, RGB(152, 215, 152)) ;
+        GraphCtrl_SetGridColor(&PerformancePageMemUsageHistoryGraph, RGB(0, 128, 64)) ;
         GraphCtrl_SetPlotColor(&PerformancePageMemUsageHistoryGraph, 0, RGB(255, 255, 0)) ;
         /*  Start our refresh thread */
 #ifdef RUN_PERF_PAGE



More information about the Ros-diffs mailing list