Dmitry Yu. Bolkhovityanov wrote:
On Thu, 8 Aug 2002, Tim Phipps wrote:
/257 will take ages on any processor, /256 will take one cycle on most.
257 is the correct scale factor for conversion between 8- and
16-bit colors: 257==0x101, so that e.g. 0xFF becomes 0x if multiplied
b
On Thu, Aug 08, 2002 at 05:15:56PM +0200, Olivier Chapuis wrote:
> On Thu, Aug 08, 2002 at 03:18:06PM +0100, Tim Phipps wrote:
> > OK->find . -name '*.h' -o -name '*.c' | xargs grep -n 257
> > [snip]
> >
> > I can't help feeling that 257 is the wrong number for all this stuff and
> > 256 is the c
On Thu, Aug 08, 2002 at 03:18:06PM +0100, Tim Phipps wrote:
> OK->find . -name '*.h' -o -name '*.c' | xargs grep -n 257
> [snip]
>
> I can't help feeling that 257 is the wrong number for all this stuff and
> 256 is the correct number. It might be better to just leave most of
> these things as un
On Thu, 8 Aug 2002, Tim Phipps wrote:
[SNIP]
> I can't help feeling that 257 is the wrong number for all this stuff and
> 256 is the correct number. It might be better to just leave most of
> these things as unsigned shorts or pass XColor's around and convert to
> byte size pieces as late as po
OK->find . -name '*.h' -o -name '*.c' | xargs grep -n 257
./fvwm/ewmh_icons.c:343:fg[0] = colors[0].blue/257;
./fvwm/ewmh_icons.c:344:fg[1] = colors[0].green/257;
./fvwm/ewmh_icons.c:345:fg[2] = colors[0].red/257;
./fvwm/ewmh_icons.c:346: