mirror of
https://github.com/reactos/reactos.git
synced 2025-05-18 16:51:18 +00:00
Make the horizontal and vertical axis in the history graphs solid lines instead of the dotted 80's style we had.
svn path=/trunk/; revision=41260
This commit is contained in:
parent
70a581c537
commit
00e85059d8
2 changed files with 17 additions and 23 deletions
|
@ -77,7 +77,7 @@ static void GraphCtrl_Init(TGraphCtrl* this)
|
|||
/* 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 @@ void GraphCtrl_InvalidateCtrl(TGraphCtrl* this, BOOL bResize)
|
|||
/* 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 @@ void GraphCtrl_InvalidateCtrl(TGraphCtrl* this, BOOL bResize)
|
|||
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)
|
||||
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)
|
||||
{
|
||||
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);
|
||||
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);
|
||||
}
|
||||
|
||||
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); */
|
||||
}
|
||||
}
|
||||
SelectObject(this->m_dcGrid, oldPen);
|
||||
DeleteObject(solidPen);
|
||||
|
||||
#if 0
|
||||
/* create some fonts (horizontal and vertical) */
|
||||
|
|
|
@ -178,7 +178,7 @@ PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
/* 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 @@ PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue