ReactOS 0.4.15-dev-7953-g1f49173
DPtoLP.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS api tests
3 * LICENSE: GPL - See COPYING in the top level directory
4 * PURPOSE: Test for ...
5 * PROGRAMMERS: Timo Kreuzer
6 * Katayama Hirofumi MZ
7 */
8
9#include "precomp.h"
10
11#define INVALID_POINTER ((PVOID)(ULONG_PTR)0xdeadbeefdeadbeefULL)
12#define NO_CHECK 0xFACECAFE
13#define CALC_VALUE_1 0xBADACE01
14#define CALC_VALUE_2 0xFEEDF00D
15#define CALC_VALUE_3 0xDEADCAD1
16#define DISPLAY_SIZE 0xDEADBEEF
17#define NEGA_DISPLAY_SIZE 0xBEEFDEAD
18
19typedef struct PRESET
20{
25
31
32typedef struct TEST_ENTRY
33{
34 INT lineno;
37
40
42
47
52
56
57#define PRESET0 { 0, 0, 0, 0, 0, 0, 0, 0 }
58#define PRESET1 { 0, 0, 1, 1, 0, 0, 1, 1 }
59#define PRESET2 { 75, 0, 1, 1, 0, 0, 10, 10 }
60#define PRESET3 { 0, 180, 1, 1, 120, 0, 1, 1 }
61#define PRESET4 { 0, 0, 200, 1, 50, 0, 1, 1 }
62#define PRESET5 { 0, 0, 1, 200, 0, 0, -100, 1 }
63#define PRESET6 { 50, 0, 1, 200, 10, 0, 100, 200 }
64
65static const TEST_ENTRY s_entries[] =
66{
67 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET0, 0, 0, 1, 1, 0, 0, 1, 1, { 100, 150 }, { 100, 150 } },
68 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET1, 0, 0, 1, 1, 0, 0, 1, 1, { 100, 150 }, { 100, 150 } },
69 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET2, 75, 0, 1, 1, 0, 0, 1, 1, { 100, 150 }, { 175, 150 } },
70 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET3, 0, 180, 1, 1, 120, 0, 1, 1, { 100, 150 }, { -20, 330 } },
71 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET4, 0, 0, 1, 1, 50, 0, 1, 1, { 100, 150 }, { 50, 150 } },
72 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET5, 0, 0, 1, 1, 0, 0, 1, 1, { 100, 150 }, { 100, 150 } },
73 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET6, 50, 0, 1, 1, 10, 0, 1, 1, { 100, 150 }, { 140, 150 } },
74
75 { __LINE__, TRUE, 0xDEADBEEF, FALSE, MM_ANISOTROPIC, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, NO_CHECK, NO_CHECK, { 100, 150 }, { NO_CHECK, NO_CHECK } },
76 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ANISOTROPIC, PRESET1, 0, 0, 1, 1, 0, 0, 1, 1, { 100, 150 }, { 100, 150 } },
77 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ANISOTROPIC, PRESET2, 75, 0, 1, 1, 0, 0, 10, 10, { 100, 150 }, { 85, 15 } },
78 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ANISOTROPIC, PRESET3, 0, 180, 1, 1, 120, 0, 1, 1, { 100, 150 }, { -20, 330 } },
79 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ANISOTROPIC, PRESET4, 0, 0, 200, 1, 50, 0, 1, 1, { 100, 150 }, { 10000, 150 } },
80 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ANISOTROPIC, PRESET5, 0, 0, 1, 200, 0, 0, -100, 1, { 100, 150 }, { -1, 30000 } },
81 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ANISOTROPIC, PRESET6, 50, 0, 1, 200, 10, 0, 100, 200, { 100, 150 }, { 51, 150 } },
82
83 { __LINE__, TRUE, 0xDEADBEEF, FALSE, MM_ISOTROPIC, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, NO_CHECK, NO_CHECK, { 100, 150 }, { NO_CHECK, NO_CHECK } },
84 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ISOTROPIC, PRESET1, 0, 0, 1, 1, 0, 0, 1, 1, { 100, 150 }, { 100, 150 } },
85 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ISOTROPIC, PRESET2, 75, 0, 1, 1, 0, 0, 10, 10, { 100, 150 }, { 85, 15 } },
86 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ISOTROPIC, PRESET3, 0, 180, 1, 1, 120, 0, 1, 1, { 100, 150 }, { -20, 330 } },
87 { __LINE__, FALSE, 0xDEADBEEF, TRUE, MM_ISOTROPIC, PRESET4, 0, 0, 200, 1, 50, 0, 1, 0, { 100, 150 }, { 100, 150 } },
88 { __LINE__, FALSE, 0xDEADBEEF, TRUE, MM_ISOTROPIC, PRESET5, 0, 0, 1, 200, 0, 0, 0, 1, { 100, 150 }, { 100, 150 } },
89 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ISOTROPIC, PRESET6, 50, 0, 1, 200, 10, 0, 1, 200, { 100, 150 }, { 140, 150 } },
90
91 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
92 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET1, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
93 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET2, 75, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
94 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET3, 0, 180, NO_CHECK, NO_CHECK, 120, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
95 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET4, 0, 0, NO_CHECK, NO_CHECK, 50, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
96 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET5, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
97 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET6, 50, 0, NO_CHECK, NO_CHECK, 10, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
98
99 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
100 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET1, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
101 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET2, 75, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
102 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET3, 0, 180, NO_CHECK, NO_CHECK, 120, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
103 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET4, 0, 0, NO_CHECK, NO_CHECK, 50, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
104 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET5, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
105 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET6, 50, 0, NO_CHECK, NO_CHECK, 10, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
106
107 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
108 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET1, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
109 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET2, 75, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
110 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET3, 0, 180, NO_CHECK, NO_CHECK, 120, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
111 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET4, 0, 0, NO_CHECK, NO_CHECK, 50, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
112 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET5, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
113 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET6, 50, 0, NO_CHECK, NO_CHECK, 10, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
114
115 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
116 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET1, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
117 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET2, 75, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
118 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET3, 0, 180, NO_CHECK, NO_CHECK, 120, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
119 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET4, 0, 0, NO_CHECK, NO_CHECK, 50, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
120 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET5, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
121 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET6, 50, 0, NO_CHECK, NO_CHECK, 10, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
122
123 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
124 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET1, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
125 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET2, 75, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
126 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET3, 0, 180, NO_CHECK, NO_CHECK, 120, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
127 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET4, 0, 0, NO_CHECK, NO_CHECK, 50, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
128 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET5, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
129 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET6, 50, 0, NO_CHECK, NO_CHECK, 10, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_1 , CALC_VALUE_1 } },
130};
131static const size_t s_entries_count = _countof(s_entries);
132
134{
135 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET0, 0, 0, 1, 1, 0, 0, 1, 1, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
136 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET1, 0, 0, 1, 1, 0, 0, 1, 1, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
137 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET2, 75, 0, 1, 1, 0, 0, 1, 1, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
138 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET3, 0, 180, 1, 1, 120, 0, 1, 1, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
139 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET4, 0, 0, 1, 1, 50, 0, 1, 1, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
140 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET5, 0, 0, 1, 1, 0, 0, 1, 1, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
141 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET6, 50, 0, 1, 1, 10, 0, 1, 1, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
142
143 { __LINE__, TRUE, 0xDEADBEEF, FALSE, MM_ANISOTROPIC, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, NO_CHECK, NO_CHECK, { 100, 150 }, { NO_CHECK, NO_CHECK } },
144 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ANISOTROPIC, PRESET1, 0, 0, 1, 1, 0, 0, 1, 1, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
145 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ANISOTROPIC, PRESET2, 75, 0, 1, 1, 0, 0, 10, 10, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
146 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ANISOTROPIC, PRESET3, 0, 180, 1, 1, 120, 0, 1, 1, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
147 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ANISOTROPIC, PRESET4, 0, 0, 200, 1, 50, 0, 1, 1, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
148 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ANISOTROPIC, PRESET5, 0, 0, 1, 200, 0, 0, -100, 1, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
149 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ANISOTROPIC, PRESET6, 50, 0, 1, 200, 10, 0, 100, 200, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
150
151 { __LINE__, TRUE, 0xDEADBEEF, FALSE, MM_ISOTROPIC, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, NO_CHECK, NO_CHECK, { 100, 150 }, { NO_CHECK, NO_CHECK } },
152 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ISOTROPIC, PRESET1, 0, 0, 1, 1, 0, 0, 1, 1, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
153 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ISOTROPIC, PRESET2, 75, 0, 1, 1, 0, 0, 10, 10, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
154 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ISOTROPIC, PRESET3, 0, 180, 1, 1, 120, 0, 1, 1, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
155 { __LINE__, FALSE, 0xDEADBEEF, TRUE, MM_ISOTROPIC, PRESET4, 0, 0, 200, 1, 50, 0, 1, 0, { 100, 150 }, { 100, 150 } },
156 { __LINE__, FALSE, 0xDEADBEEF, TRUE, MM_ISOTROPIC, PRESET5, 0, 0, 1, 200, 0, 0, 0, 1, { 100, 150 }, { 100, 150 } },
157 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ISOTROPIC, PRESET6, 50, 0, 1, 200, 10, 0, 1, 200, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
158
159 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
160 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET1, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
161 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET2, 75, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
162 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET3, 0, 180, NO_CHECK, NO_CHECK, 120, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
163 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET4, 0, 0, NO_CHECK, NO_CHECK, 50, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
164 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET5, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
165 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET6, 50, 0, NO_CHECK, NO_CHECK, 10, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
166
167 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
168 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET1, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
169 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET2, 75, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
170 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET3, 0, 180, NO_CHECK, NO_CHECK, 120, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
171 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET4, 0, 0, NO_CHECK, NO_CHECK, 50, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
172 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET5, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
173 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET6, 50, 0, NO_CHECK, NO_CHECK, 10, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
174
175 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
176 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET1, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
177 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET2, 75, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
178 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET3, 0, 180, NO_CHECK, NO_CHECK, 120, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
179 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET4, 0, 0, NO_CHECK, NO_CHECK, 50, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
180 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET5, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
181 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET6, 50, 0, NO_CHECK, NO_CHECK, 10, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
182
183 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
184 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET1, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
185 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET2, 75, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
186 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET3, 0, 180, NO_CHECK, NO_CHECK, 120, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
187 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET4, 0, 0, NO_CHECK, NO_CHECK, 50, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
188 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET5, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
189 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET6, 50, 0, NO_CHECK, NO_CHECK, 10, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
190
191 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
192 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET1, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
193 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET2, 75, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
194 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET3, 0, 180, NO_CHECK, NO_CHECK, 120, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
195 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET4, 0, 0, NO_CHECK, NO_CHECK, 50, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
196 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET5, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
197 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET6, 50, 0, NO_CHECK, NO_CHECK, 10, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_2, CALC_VALUE_2 } },
198};
200
202{
203 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET0, 0, 0, 1, 1, 0, 0, 1, 1, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
204 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET1, 0, 0, 1, 1, 0, 0, 1, 1, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
205 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET2, 75, 0, 1, 1, 0, 0, 1, 1, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
206 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET3, 0, 180, 1, 1, 120, 0, 1, 1, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
207 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET4, 0, 0, 1, 1, 50, 0, 1, 1, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
208 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET5, 0, 0, 1, 1, 0, 0, 1, 1, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
209 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TEXT, PRESET6, 50, 0, 1, 1, 10, 0, 1, 1, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
210
211 { __LINE__, TRUE, 0xDEADBEEF, FALSE, MM_ANISOTROPIC, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, NO_CHECK, NO_CHECK, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
212 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ANISOTROPIC, PRESET1, 0, 0, 1, 1, 0, 0, 1, 1, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
213 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ANISOTROPIC, PRESET2, 75, 0, 1, 1, 0, 0, 10, 10, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
214 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ANISOTROPIC, PRESET3, 0, 180, 1, 1, 120, 0, 1, 1, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
215 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ANISOTROPIC, PRESET4, 0, 0, 200, 1, 50, 0, 1, 1, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
216 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ANISOTROPIC, PRESET5, 0, 0, 1, 200, 0, 0, -100, 1, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
217 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ANISOTROPIC, PRESET6, 50, 0, 1, 200, 10, 0, 100, 200, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
218
219 { __LINE__, TRUE, 0xDEADBEEF, FALSE, MM_ISOTROPIC, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, NO_CHECK, NO_CHECK, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
220 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ISOTROPIC, PRESET1, 0, 0, 1, 1, 0, 0, 1, 1, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
221 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ISOTROPIC, PRESET2, 75, 0, 1, 1, 0, 0, 10, 10, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
222 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ISOTROPIC, PRESET3, 0, 180, 1, 1, 120, 0, 1, 1, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
223 { __LINE__, FALSE, 0xDEADBEEF, TRUE, MM_ISOTROPIC, PRESET4, 0, 0, 200, 1, 50, 0, 1, 0, { 100, 150 }, { 100, 150 } },
224 { __LINE__, FALSE, 0xDEADBEEF, TRUE, MM_ISOTROPIC, PRESET5, 0, 0, 1, 200, 0, 0, 0, 1, { 100, 150 }, { 100, 150 } },
225 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_ISOTROPIC, PRESET6, 50, 0, 1, 200, 10, 0, 1, 200, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
226
227 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
228 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET1, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
229 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET2, 75, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
230 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET3, 0, 180, NO_CHECK, NO_CHECK, 120, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
231 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET4, 0, 0, NO_CHECK, NO_CHECK, 50, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
232 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET5, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
233 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOMETRIC, PRESET6, 50, 0, NO_CHECK, NO_CHECK, 10, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
234
235 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
236 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET1, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
237 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET2, 75, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
238 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET3, 0, 180, NO_CHECK, NO_CHECK, 120, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
239 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET4, 0, 0, NO_CHECK, NO_CHECK, 50, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
240 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET5, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
241 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIMETRIC, PRESET6, 50, 0, NO_CHECK, NO_CHECK, 10, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
242
243 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
244 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET1, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
245 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET2, 75, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
246 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET3, 0, 180, NO_CHECK, NO_CHECK, 120, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
247 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET4, 0, 0, NO_CHECK, NO_CHECK, 50, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
248 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET5, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
249 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_LOENGLISH, PRESET6, 50, 0, NO_CHECK, NO_CHECK, 10, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
250
251 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
252 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET1, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
253 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET2, 75, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
254 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET3, 0, 180, NO_CHECK, NO_CHECK, 120, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
255 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET4, 0, 0, NO_CHECK, NO_CHECK, 50, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
256 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET5, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
257 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_HIENGLISH, PRESET6, 50, 0, NO_CHECK, NO_CHECK, 10, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
258
259 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET0, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
260 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET1, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
261 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET2, 75, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
262 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET3, 0, 180, NO_CHECK, NO_CHECK, 120, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
263 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET4, 0, 0, NO_CHECK, NO_CHECK, 50, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
264 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET5, 0, 0, NO_CHECK, NO_CHECK, 0, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
265 { __LINE__, TRUE, 0xDEADBEEF, TRUE, MM_TWIPS, PRESET6, 50, 0, NO_CHECK, NO_CHECK, 10, 0, DISPLAY_SIZE, NEGA_DISPLAY_SIZE, { 100, 150 }, { CALC_VALUE_3, CALC_VALUE_3 } },
266};
268
269static void SetXForm1(XFORM *pxform)
270{
271 pxform->eM11 = 1;
272 pxform->eM12 = 0;
273 pxform->eM21 = 0;
274 pxform->eM22 = 1;
275 pxform->eDx = 314;
276 pxform->eDy = -99;
277}
278
279static void SetXForm2(XFORM *pxform)
280{
281 pxform->eM11 = 2;
282 pxform->eM12 = 0;
283 pxform->eM21 = 0;
284 pxform->eM22 = 3;
285 pxform->eDx = 0;
286 pxform->eDy = 0;
287}
288
289static BOOL InverseXForm(XFORM *pxform)
290{
291 XFORM xform = *pxform;
292 FLOAT delta = xform.eM11 * xform.eM22 - xform.eM12 * xform.eM21;
293 if (delta == 0)
294 return FALSE;
295
296 pxform->eM11 = xform.eM22 / delta;
297 pxform->eM12 = -xform.eM12 / delta;
298 pxform->eM21 = -xform.eM21 / delta;
299 pxform->eM22 = xform.eM11 / delta;
300 pxform->eDx = (-xform.eM22 * xform.eDx + xform.eM12 * xform.eDy);
301 pxform->eDy = (xform.eM21 * xform.eDx - xform.eM11 * xform.eDy);
302 return TRUE;
303}
304
305static void DoTestEntry(HDC hDC, const TEST_ENTRY *entry)
306{
307 POINT pt, ptWnd, ptView;
308 SIZE siz, sizWnd, sizView;
309 INT ret;
310
311 SetMapMode(hDC, entry->nMapMode);
312
313 ret = SetWindowOrgEx(hDC, entry->preset.xWnd, entry->preset.yWnd, NULL);
314 ok(ret == TRUE, "Line %d: SetWindowOrgEx failed\n", entry->lineno);
315
316 ret = SetWindowExtEx(hDC, entry->preset.cxWnd, entry->preset.cyWnd, NULL);
317 ok(ret == entry->bWndExt, "Line %d: SetWindowExtEx() expected %d, was %d\n", entry->lineno, entry->bWndExt, ret);
318
319 ret = SetViewportOrgEx(hDC, entry->preset.xView, entry->preset.yView, NULL);
320 ok(ret == TRUE, "Line %d: SetViewportOrgEx failed\n", entry->lineno);
321
322 ret = SetViewportExtEx(hDC, entry->preset.cxView, entry->preset.cyView, NULL);
323 ok(ret == TRUE, "Line %d: SetViewportExtEx failed\n", entry->lineno);
324
325 ok(GetWindowOrgEx(hDC, &pt) == TRUE, "Line %d: GetWindowOrgEx failed\n", entry->lineno);
326 ptWnd = pt;
327 ok(GetWindowExtEx(hDC, &siz) == TRUE, "Line %d: GetWindowExtEx failed\n", entry->lineno);
328 sizWnd = siz;
329
330 ok(pt.x == entry->xWndOut && pt.y == entry->yWndOut,
331 "Line %d: Window org expected (%ld, %ld), was (%ld, %ld)\n",
332 entry->lineno, entry->xWndOut, entry->yWndOut, pt.x, pt.y);
333
334 if (entry->cxWndOut == DISPLAY_SIZE || entry->cxWndOut == NEGA_DISPLAY_SIZE)
335 {
338 if (entry->cxWndOut == NEGA_DISPLAY_SIZE)
339 cx = -cx;
340 if (entry->cyWndOut == NEGA_DISPLAY_SIZE)
341 cy = -cy;
342 ok(siz.cx == cx && siz.cy == cy,
343 "Line %d: Window ext expected display size (%ld, %ld), was (%ld, %ld)\n",
344 entry->lineno, cx, cy, siz.cx, siz.cy);
345 }
346 else if (entry->cxWndOut != NO_CHECK)
347 {
348 ok(siz.cx == entry->cxWndOut && siz.cy == entry->cyWndOut,
349 "Line %d: Window ext expected (%ld, %ld), was (%ld, %ld)\n",
350 entry->lineno, entry->cxWndOut, entry->cyWndOut, siz.cx, siz.cy);
351 }
352
353 ok(GetViewportOrgEx(hDC, &pt) == TRUE, "Line %d: GetViewportOrgEx failed\n", entry->lineno);
354 ptView = pt;
355 ok(GetViewportExtEx(hDC, &siz) == TRUE, "Line %d: GetViewportExtEx failed\n", entry->lineno);
356 sizView = siz;
357
358 ok(pt.x == entry->xViewOut && pt.y == entry->yViewOut,
359 "Line %d: Viewport org expected (%ld, %ld), was (%ld, %ld)\n",
360 entry->lineno, entry->xViewOut , entry->yViewOut, pt.x, pt.y);
361
362 if (entry->cxViewOut == DISPLAY_SIZE || entry->cxViewOut == NEGA_DISPLAY_SIZE)
363 {
366 if (entry->cxViewOut == NEGA_DISPLAY_SIZE)
367 cx = -cx;
368 if (entry->cyViewOut == NEGA_DISPLAY_SIZE)
369 cy = -cy;
370 ok(siz.cx == cx && siz.cy == cy,
371 "Line %d: Viewport ext expected display size (%ld, %ld), was (%ld, %ld)\n",
372 entry->lineno, cx, cy, siz.cx, siz.cy);
373 }
374 else if (entry->cxViewOut != NO_CHECK)
375 {
376 ok(siz.cx == entry->cxViewOut && siz.cy == entry->cyViewOut,
377 "Line %d: Viewport ext expected (%ld, %ld), was (%ld, %ld)\n",
378 entry->lineno, entry->cxViewOut, entry->cyViewOut, siz.cx, siz.cy);
379 }
380
381 pt = entry->ptSrc;
382
383 SetLastError(0xDEADBEEF);
384 ret = DPtoLP(hDC, &pt, 1);
385 ok(ret == entry->ret, "Line %d: DPtoLP() expected %d, was %d\n", entry->lineno, entry->ret, ret);
386
387 ok(GetLastError() == entry->error, "Line %d: GetLastError() expected %ld, was %ld\n",
388 entry->lineno, entry->error, GetLastError());
389
390 if (entry->ptDest.x == CALC_VALUE_1)
391 {
392 LONG x = MulDiv(entry->ptSrc.x - ptView.x, sizWnd.cx, sizView.cx) + ptWnd.x;
393 LONG y = MulDiv(entry->ptSrc.y - ptView.y, sizWnd.cy, sizView.cy) + ptWnd.y;
394 // TODO: make more accurate
395 ok(labs(pt.x - x) <= 1 && labs(pt.y - y) <= 1,
396 "Line %d: Dest expected (%ld, %ld), was (%ld, %ld)\n",
397 entry->lineno, x, y, pt.x, pt.y);
398 }
399 else if (entry->ptDest.x == CALC_VALUE_2)
400 {
401 XFORM xform;
402 LONG x, y;
403 SetXForm1(&xform);
404 if (InverseXForm(&xform))
405 {
406 x = MulDiv(entry->ptSrc.x - ptView.x, sizWnd.cx, sizView.cx) + ptWnd.x;
407 y = MulDiv(entry->ptSrc.y - ptView.y, sizWnd.cy, sizView.cy) + ptWnd.y;
408 x = (LONG)((xform.eM11 * x + xform.eM12 * y) + xform.eDx);
409 y = (LONG)((xform.eM21 * x + xform.eM22 * y) + xform.eDy);
410 // TODO: make more accurate
411 ok(labs(pt.x - x) <= 1 && labs(pt.y - y) <= 1,
412 "Line %d: Dest expected (%ld, %ld), was (%ld, %ld)\n",
413 entry->lineno, x, y, pt.x, pt.y);
414 }
415 }
416 else if (entry->ptDest.x == CALC_VALUE_3)
417 {
418 XFORM xform;
419 LONG x, y;
420 SetXForm2(&xform);
421 if (InverseXForm(&xform))
422 {
423 x = MulDiv(entry->ptSrc.x - ptView.x, sizWnd.cx, sizView.cx) + ptWnd.x;
424 y = MulDiv(entry->ptSrc.y - ptView.y, sizWnd.cy, sizView.cy) + ptWnd.y;
425 x = (LONG)((xform.eM11 * x + xform.eM12 * y) + xform.eDx);
426 y = (LONG)((xform.eM21 * x + xform.eM22 * y) + xform.eDy);
427 // TODO: make more accurate
428 ok(labs(pt.x - x) <= 2 && labs(pt.y - y) <= 2,
429 "Line %d: Dest expected (%ld, %ld), was (%ld, %ld)\n",
430 entry->lineno, x, y, pt.x, pt.y);
431 }
432 }
433 else if (entry->ptDest.x != NO_CHECK)
434 {
435 ok(pt.x == entry->ptDest.x && pt.y == entry->ptDest.y,
436 "Line %d: Dest expected (%ld, %ld), was (%ld, %ld)\n",
437 entry->lineno, entry->ptDest.x, entry->ptDest.y, pt.x, pt.y);
438 }
439}
440
442{
443 size_t i;
444 POINT apt[2];
445 XFORM xform;
446
448 ok(hDC != NULL, "hDC is NULL\n");
449
450 SetLastError(0xDEADBEEF);
451 ok_int(DPtoLP(NULL, NULL, 0), 1);
452 ok_err(0xDEADBEEF);
453
454 ok_int(DPtoLP(NULL, NULL, -1), 1);
455 ok_err(0xDEADBEEF);
456
458 ok_err(0xDEADBEEF);
459
460 ok_int(DPtoLP(NULL, NULL, 2), 0);
462
463 SetLastError(0xDEADBEEF);
464 ok_int(DPtoLP(NULL, apt, 2), 0);
466
467 SetLastError(0xDEADBEEF);
468 ok_int(DPtoLP(NULL, apt, 0), 1);
469 ok_err(0xDEADBEEF);
470
471 SetLastError(0xDEADBEEF);
472 ok_int(DPtoLP(NULL, apt, -2), 1);
473 ok_err(0xDEADBEEF);
474
475 SetLastError(0xDEADBEEF);
476 ok_int(DPtoLP((HDC)-4, apt, -2), 1);
477 ok_err(0xDEADBEEF);
478
479 SetLastError(0xDEADBEEF);
480 ok_int(DPtoLP(hDC, NULL, 2), 1);
481 ok_err(0xDEADBEEF);
482
483 SetLastError(0xDEADBEEF);
485 ok_err(0xDEADBEEF);
486
489
490 for (i = 0; i < s_entries_count; ++i)
491 {
493 }
494
497
498 for (i = 0; i < s_entries_count; ++i)
499 {
501 }
502
503 SetXForm1(&xform);
505 SetWorldTransform(hDC, &xform);
506 for (i = 0; i < s_shifted_entries_count; ++i)
507 {
509 }
510
511 SetXForm2(&xform);
513 SetWorldTransform(hDC, &xform);
514 for (i = 0; i < s_transformed_entries_count; ++i)
515 {
517 }
518
519 DeleteDC(hDC);
520}
static HDC hDC
Definition: 3dtext.c:33
#define PRESET3
Definition: DPtoLP.c:60
#define DISPLAY_SIZE
Definition: DPtoLP.c:16
#define PRESET4
Definition: DPtoLP.c:61
#define NO_CHECK
Definition: DPtoLP.c:12
static const TEST_ENTRY s_transformed_entries[]
Definition: DPtoLP.c:201
#define PRESET0
Definition: DPtoLP.c:57
#define CALC_VALUE_1
Definition: DPtoLP.c:13
#define PRESET6
Definition: DPtoLP.c:63
static const TEST_ENTRY s_entries[]
Definition: DPtoLP.c:65
struct PRESET PRESET
static void SetXForm1(XFORM *pxform)
Definition: DPtoLP.c:269
static void SetXForm2(XFORM *pxform)
Definition: DPtoLP.c:279
static const size_t s_entries_count
Definition: DPtoLP.c:131
#define PRESET5
Definition: DPtoLP.c:62
static const size_t s_transformed_entries_count
Definition: DPtoLP.c:267
#define PRESET1
Definition: DPtoLP.c:58
#define INVALID_POINTER
Definition: DPtoLP.c:11
#define NEGA_DISPLAY_SIZE
Definition: DPtoLP.c:17
static const size_t s_shifted_entries_count
Definition: DPtoLP.c:199
struct TEST_ENTRY TEST_ENTRY
#define PRESET2
Definition: DPtoLP.c:59
#define CALC_VALUE_3
Definition: DPtoLP.c:15
static void DoTestEntry(HDC hDC, const TEST_ENTRY *entry)
Definition: DPtoLP.c:305
#define CALC_VALUE_2
Definition: DPtoLP.c:14
static BOOL InverseXForm(XFORM *pxform)
Definition: DPtoLP.c:289
static const TEST_ENTRY s_shifted_entries[]
Definition: DPtoLP.c:133
#define ok(value,...)
Definition: atltest.h:57
#define ok_err(error)
Definition: atltest.h:124
#define START_TEST(x)
Definition: atltest.h:75
#define ok_int(expression, result)
Definition: atltest.h:134
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
#define pt(x, y)
Definition: drawing.c:79
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
_Check_return_ long __cdecl labs(_In_ long x)
uint32_t entry
Definition: isohybrid.c:63
static HDC
Definition: imagelist.c:92
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
long LONG
Definition: pedump.c:60
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
#define _countof(array)
Definition: sndvol32.h:68
Definition: DPtoLP.c:20
LONG xWnd
Definition: DPtoLP.c:21
LONG cyView
Definition: DPtoLP.c:29
LONG cyWnd
Definition: DPtoLP.c:24
LONG cxView
Definition: DPtoLP.c:28
LONG cxWnd
Definition: DPtoLP.c:23
LONG yWnd
Definition: DPtoLP.c:22
LONG xView
Definition: DPtoLP.c:26
LONG yView
Definition: DPtoLP.c:27
Definition: cmd.c:13
POINT ptDest
Definition: DPtoLP.c:54
INT nMapMode
Definition: DPtoLP.c:39
LONG yViewOut
Definition: DPtoLP.c:49
INT lineno
Definition: fc.c:16
BOOL bWndExt
Definition: DPtoLP.c:38
LONG cyWndOut
Definition: DPtoLP.c:46
LONG xViewOut
Definition: DPtoLP.c:48
LONG cxWndOut
Definition: DPtoLP.c:45
POINT ptSrc
Definition: DPtoLP.c:53
LONG cyViewOut
Definition: DPtoLP.c:51
LONG xWndOut
Definition: DPtoLP.c:43
PRESET preset
Definition: DPtoLP.c:41
LONG cxViewOut
Definition: DPtoLP.c:50
DWORD error
Definition: DPtoLP.c:36
BOOL ret
Definition: DPtoLP.c:35
LONG yWndOut
Definition: DPtoLP.c:44
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28
FLOAT eDy
Definition: wingdi.h:1726
FLOAT eM11
Definition: wingdi.h:1721
FLOAT eM21
Definition: wingdi.h:1723
FLOAT eM22
Definition: wingdi.h:1724
FLOAT eM12
Definition: wingdi.h:1722
FLOAT eDx
Definition: wingdi.h:1725
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
float FLOAT
Definition: typedefs.h:69
int32_t INT
Definition: typedefs.h:58
int ret
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
int WINAPI SetMapMode(_In_ HDC, _In_ int)
#define GM_COMPATIBLE
Definition: wingdi.h:864
#define HORZRES
Definition: wingdi.h:716
#define MM_HIENGLISH
Definition: wingdi.h:868
#define MM_LOENGLISH
Definition: wingdi.h:871
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int WINAPI SetGraphicsMode(_In_ HDC, _In_ int)
Definition: dc.c:1226
#define GM_ADVANCED
Definition: wingdi.h:865
#define MM_HIMETRIC
Definition: wingdi.h:869
BOOL WINAPI SetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
Definition: coord.c:532
BOOL WINAPI SetViewportExtEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPSIZE)
Definition: coord.c:465
BOOL WINAPI GetWindowOrgEx(_In_ HDC, _Out_ LPPOINT)
Definition: coord.c:439
BOOL WINAPI DPtoLP(_In_ HDC hdc, _Inout_updates_(c) LPPOINT lppt, _In_ int c)
BOOL WINAPI SetViewportOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
Definition: coord.c:655
#define MM_ANISOTROPIC
Definition: wingdi.h:867
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI SetWindowExtEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPSIZE)
#define VERTRES
Definition: wingdi.h:717
#define MM_TWIPS
Definition: wingdi.h:874
#define MM_LOMETRIC
Definition: wingdi.h:872
#define MM_ISOTROPIC
Definition: wingdi.h:870
BOOL WINAPI GetWindowExtEx(_In_ HDC, _Out_ LPSIZE)
Definition: coord.c:411
#define MM_TEXT
Definition: wingdi.h:873
#define MWT_IDENTITY
Definition: wingdi.h:944
BOOL WINAPI SetWorldTransform(_In_ HDC, _In_ const XFORM *)
BOOL WINAPI DeleteDC(_In_ HDC)
BOOL WINAPI GetViewportExtEx(_In_ HDC, _Out_ LPSIZE)
Definition: coord.c:351
BOOL WINAPI GetViewportOrgEx(_In_ HDC, _Out_ LPPOINT)
Definition: coord.c:383
BOOL WINAPI ModifyWorldTransform(_In_ HDC, _In_opt_ const XFORM *, _In_ DWORD)