Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | elimination of gray table by using calculations in stead |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | rfe-3503317 |
Files: | files | file ages | folders |
SHA1: |
4ecc5287407e891d49c02bda9452cc5b |
User & Date: | jan.nijtmans 2012-03-17 00:33:15 |
Context
2012-03-18
| ||
16:45 | test output in Xorg rgb.txt format Closed-Leaf check-in: 588cd445 user: jan.nijtmans tags: rfe-3503317 | |
2012-03-17
| ||
00:33 | elimination of gray table by using calculations in stead check-in: 4ecc5287 user: jan.nijtmans tags: rfe-3503317 | |
00:18 | implementation complete, todo: more testing check-in: 190211c6 user: jan.nijtmans tags: rfe-3503317 | |
Changes
Changes to xlib/xcolors.c.
︙ | ︙ | |||
9 10 11 12 13 14 15 | * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" | < < < < < < < < < < < < < < < < < < < < < < | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tkInt.h" /* * Index array. For each of the characters 'a'-'y', this table gives the first color * starting with that character in the xColors table. */ static int az[] = {0, 4, 12, 19, 43, 43, 46, 56, 58, 60, 60, 61, 84, 99, 102, 107, 118, 118, 121, 134, 138, 138, 140, 143, 143, 145}; |
︙ | ︙ | |||
393 394 395 396 397 398 399 | return 0; } r = colorcmp(spec + 1, *p, &num); } if (num > (*p)[31]) { if (((*p)[31] != 8) || num > 100) return 0; | | > > > > > > < | | | > | 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | return 0; } r = colorcmp(spec + 1, *p, &num); } if (num > (*p)[31]) { if (((*p)[31] != 8) || num > 100) return 0; num = (num * 255 + 50) / 100; if ((num == 230) || (num == 128)) { /* Those two entries have a deviation i.r.t the table */ num--; } num |= (num << 8); colorPtr->red = colorPtr->green = colorPtr->blue = num; } else { q = *p + 28 - num * 3; colorPtr->red = ((RED(q) << 8) | RED(q)); colorPtr->green = ((GREEN(q) << 8) | GREEN(q)); colorPtr->blue = ((BLUE(q) << 8) | BLUE(q)); } } colorPtr->pixel = TkpGetPixel(colorPtr); colorPtr->flags = DoRed|DoGreen|DoBlue; colorPtr->pad = 0; return 1; } |
︙ | ︙ |