1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
|
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
|
-
-
-
+
+
+
-
+
|
inst->cols[ww[i]].green = inst->cfg.colours[i][1] * 0x0101;
inst->cols[ww[i]].blue = inst->cfg.colours[i][2] * 0x0101;
}
for (i = 0; i < NEXTCOLOURS; i++) {
if (i < 216) {
int r = i / 36, g = (i / 6) % 6, b = i % 6;
inst->cols[i+16].red = r * 0x3333;
inst->cols[i+16].green = g * 0x3333;
inst->cols[i+16].blue = b * 0x3333;
inst->cols[i+16].red = r ? r * 0x2828 + 0x3737 : 0;
inst->cols[i+16].green = g ? g * 0x2828 + 0x3737 : 0;
inst->cols[i+16].blue = b ? b + 0x2828 + 0x3737 : 0;
} else {
int shade = i - 216;
shade = (shade + 1) * 0xFFFF / (NEXTCOLOURS - 216 + 1);
shade = shade * 0x0a0a + 0x0808;
inst->cols[i+16].red = inst->cols[i+16].green =
inst->cols[i+16].blue = shade;
}
}
gdk_colormap_alloc_colors(inst->colmap, inst->cols, NALLCOLOURS,
FALSE, TRUE, success);
|