ReactOS 0.4.15-dev-7842-g558ab78
lines.c File Reference
#include <windows.h>
#include "rosperf.h"
Include dependency graph for lines.c:

Go to the source code of this file.

Functions

void LinesProc (void *Context, PPERF_INFO PerfInfo, unsigned Reps)
 
void LinesHorizontalProc (void *Context, PPERF_INFO PerfInfo, unsigned Reps)
 
void LinesVerticalProc (void *Context, PPERF_INFO PerfInfo, unsigned Reps)
 

Function Documentation

◆ LinesHorizontalProc()

void LinesHorizontalProc ( void Context,
PPERF_INFO  PerfInfo,
unsigned  Reps 
)

Definition at line 60 of file lines.c.

61{
62 unsigned Rep;
63 int y;
64 HDC Dc;
65
66 for (Rep = 0; Rep < Reps; )
67 {
68 Dc = (Rep & 0x10000) ? PerfInfo->BackgroundDc : PerfInfo->ForegroundDc;
69
70 for (y = 0; y < PerfInfo->WndHeight && Rep < Reps; Rep++, y += 3)
71 {
72 MoveToEx(Dc, 0, y, NULL);
73 LineTo(Dc, PerfInfo->WndWidth, y);
74 }
75 }
76}
#define NULL
Definition: types.h:112
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define for
Definition: utility.h:88
static HDC
Definition: imagelist.c:92
INT WndHeight
Definition: rosperf.h:32
HDC BackgroundDc
Definition: rosperf.h:30
HDC ForegroundDc
Definition: rosperf.h:29
INT WndWidth
Definition: rosperf.h:31
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)

◆ LinesProc()

void LinesProc ( void Context,
PPERF_INFO  PerfInfo,
unsigned  Reps 
)

Definition at line 23 of file lines.c.

24{
25 unsigned Rep;
26 int Dest;
27 HDC Dc;
28
29 for (Rep = 0; Rep < Reps; )
30 {
31 Dc = (Rep & 0x1000) ? PerfInfo->BackgroundDc : PerfInfo->ForegroundDc;
32
33 for (Dest = 2; Dest < PerfInfo->WndHeight && Rep < Reps; Rep++, Dest += 2)
34 {
35 MoveToEx(Dc, 0, 0, NULL);
36 LineTo(Dc, PerfInfo->WndWidth, Dest);
37 }
38
39 for (Dest = PerfInfo->WndWidth - 2; 0 <= Dest && Rep < Reps; Rep++, Dest -= 2)
40 {
41 MoveToEx(Dc, PerfInfo->WndWidth, 0, NULL);
42 LineTo(Dc, Dest, PerfInfo->WndHeight);
43 }
44
45 for (Dest = PerfInfo->WndHeight - 2; 0 <= Dest && Rep < Reps; Rep++, Dest -= 2)
46 {
47 MoveToEx(Dc, PerfInfo->WndWidth, PerfInfo->WndHeight, NULL);
48 LineTo(Dc, 0, Dest);
49 }
50
51 for (Dest = 2; Dest < PerfInfo->WndWidth && Rep < Reps; Rep++, Dest += 2)
52 {
53 MoveToEx(Dc, 0, PerfInfo->WndHeight, NULL);
54 LineTo(Dc, Dest, 0);
55 }
56 }
57}

◆ LinesVerticalProc()

void LinesVerticalProc ( void Context,
PPERF_INFO  PerfInfo,
unsigned  Reps 
)

Definition at line 79 of file lines.c.

80{
81 unsigned Rep;
82 int x;
83 HDC Dc;
84
85 for (Rep = 0; Rep < Reps; )
86 {
87 Dc = (Rep & 0x1000) ? PerfInfo->BackgroundDc : PerfInfo->ForegroundDc;
88
89 for (x = 0; x < PerfInfo->WndWidth && Rep < Reps; Rep++, x += 3)
90 {
91 MoveToEx(Dc, x, 0, NULL);
92 LineTo(Dc, x, PerfInfo->WndHeight);
93 }
94 }
95}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548