Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
47a1515a
Commit
47a1515a
authored
Dec 03, 2010
by
schurade
Browse files
[CHANGE] preset the first 320 HSV colors
parent
6ff33663
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
src/graphicsEngine/WGEUtils.cpp
src/graphicsEngine/WGEUtils.cpp
+22
-1
No files found.
src/graphicsEngine/WGEUtils.cpp
View file @
47a1515a
...
...
@@ -161,5 +161,26 @@ WColor wge::getNthHSVColor( int n, int parts )
parts
=
360
;
}
int
frac
=
360
/
parts
;
if
(
parts
>
320
)
{
return
createColorFromHSV
(
n
*
frac
);
}
else
{
int
preset
[
320
]
=
{
0
,
180
,
90
,
270
,
45
,
225
,
135
,
315
,
22
,
202
,
112
,
292
,
67
,
247
,
157
,
337
,
11
,
191
,
101
,
281
,
56
,
236
,
146
,
326
,
33
,
213
,
123
,
303
,
78
,
258
,
168
,
348
,
5
,
185
,
95
,
275
,
50
,
230
,
140
,
320
,
27
,
207
,
117
,
297
,
72
,
252
,
162
,
342
,
16
,
196
,
106
,
286
,
61
,
241
,
151
,
331
,
38
,
218
,
128
,
308
,
83
,
263
,
173
,
353
,
2
,
182
,
92
,
272
,
47
,
227
,
137
,
317
,
24
,
204
,
114
,
294
,
69
,
249
,
159
,
339
,
13
,
193
,
103
,
283
,
58
,
238
,
148
,
328
,
35
,
215
,
125
,
305
,
80
,
260
,
170
,
350
,
7
,
187
,
97
,
277
,
52
,
232
,
142
,
322
,
29
,
209
,
119
,
299
,
74
,
254
,
164
,
344
,
18
,
198
,
108
,
288
,
63
,
243
,
153
,
333
,
40
,
220
,
130
,
310
,
85
,
265
,
175
,
355
,
1
,
181
,
91
,
271
,
46
,
226
,
136
,
316
,
23
,
203
,
113
,
293
,
68
,
248
,
158
,
338
,
12
,
192
,
102
,
282
,
57
,
237
,
147
,
327
,
34
,
214
,
124
,
304
,
79
,
259
,
169
,
349
,
6
,
186
,
96
,
276
,
51
,
231
,
141
,
321
,
28
,
208
,
118
,
298
,
73
,
253
,
163
,
343
,
17
,
197
,
107
,
287
,
62
,
242
,
152
,
332
,
39
,
219
,
129
,
309
,
84
,
264
,
174
,
354
,
3
,
183
,
93
,
273
,
48
,
228
,
138
,
318
,
25
,
205
,
115
,
295
,
70
,
250
,
160
,
340
,
14
,
194
,
104
,
284
,
59
,
239
,
149
,
329
,
36
,
216
,
126
,
306
,
81
,
261
,
171
,
351
,
8
,
188
,
98
,
278
,
53
,
233
,
143
,
323
,
30
,
210
,
120
,
300
,
75
,
255
,
165
,
345
,
19
,
199
,
109
,
289
,
64
,
244
,
154
,
334
,
41
,
221
,
131
,
311
,
86
,
266
,
176
,
356
,
4
,
184
,
94
,
274
,
49
,
229
,
139
,
319
,
26
,
206
,
116
,
296
,
71
,
251
,
161
,
341
,
15
,
195
,
105
,
285
,
60
,
240
,
150
,
330
,
37
,
217
,
127
,
307
,
82
,
262
,
172
,
352
,
9
,
189
,
99
,
279
,
54
,
234
,
144
,
324
,
31
,
211
,
121
,
301
,
76
,
256
,
166
,
346
,
20
,
200
,
110
,
290
,
65
,
245
,
155
,
335
,
42
,
222
,
132
,
312
,
87
,
267
,
177
,
357
};
return
createColorFromHSV
(
preset
[
n
]
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment