2 * ReactOS RosPerf - ReactOS GUI performance test program
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 LinesProc(void *Context
, PPERF_INFO PerfInfo
, unsigned Reps
)
29 for (Rep
= 0; Rep
< Reps
; )
31 Dc
= (Rep
& 0x1000) ? PerfInfo
->BackgroundDc
: PerfInfo
->ForegroundDc
;
33 for (Dest
= 2; Dest
< PerfInfo
->WndHeight
&& Rep
< Reps
; Rep
++, Dest
+= 2)
35 MoveToEx(Dc
, 0, 0, NULL
);
36 LineTo(Dc
, PerfInfo
->WndWidth
, Dest
);
39 for (Dest
= PerfInfo
->WndWidth
- 2; 0 <= Dest
&& Rep
< Reps
; Rep
++, Dest
-= 2)
41 MoveToEx(Dc
, PerfInfo
->WndWidth
, 0, NULL
);
42 LineTo(Dc
, Dest
, PerfInfo
->WndHeight
);
45 for (Dest
= PerfInfo
->WndHeight
- 2; 0 <= Dest
&& Rep
< Reps
; Rep
++, Dest
-= 2)
47 MoveToEx(Dc
, PerfInfo
->WndWidth
, PerfInfo
->WndHeight
, NULL
);
51 for (Dest
= 2; Dest
< PerfInfo
->WndWidth
&& Rep
< Reps
; Rep
++, Dest
+= 2)
53 MoveToEx(Dc
, 0, PerfInfo
->WndHeight
, NULL
);
60 LinesHorizontalProc(void *Context
, PPERF_INFO PerfInfo
, unsigned Reps
)
66 for (Rep
= 0; Rep
< Reps
; )
68 Dc
= (Rep
& 0x10000) ? PerfInfo
->BackgroundDc
: PerfInfo
->ForegroundDc
;
70 for (y
= 0; y
< PerfInfo
->WndHeight
&& Rep
< Reps
; Rep
++, y
+= 3)
72 MoveToEx(Dc
, 0, y
, NULL
);
73 LineTo(Dc
, PerfInfo
->WndWidth
, y
);
79 LinesVerticalProc(void *Context
, PPERF_INFO PerfInfo
, unsigned Reps
)
85 for (Rep
= 0; Rep
< Reps
; )
87 Dc
= (Rep
& 0x1000) ? PerfInfo
->BackgroundDc
: PerfInfo
->ForegroundDc
;
89 for (x
= 0; x
< PerfInfo
->WndWidth
&& Rep
< Reps
; Rep
++, x
+= 3)
91 MoveToEx(Dc
, x
, 0, NULL
);
92 LineTo(Dc
, x
, PerfInfo
->WndHeight
);