[geeks] fti to svg conversion
Caleb Shay
caleb at webninja.com
Tue Oct 29 21:45:03 CST 2002
On Tue, 2002-10-29 at 22:31, Joshua D Boyd wrote:
> On Tue, Oct 29, 2002 at 10:19:14PM -0500, Caleb Shay wrote:
> > On Tue, 2002-10-29 at 22:05, Joshua D Boyd wrote:
> >
> > >
> > > So the icons are color mapped rather than 24bit? Should be easy enough
> > > to tweak the color map then.
> >
> > Should be easy, except that I don't know what the correct color values
> > are :).
>
> Screen cap on irix, and examine the pixel colors?
Which would bring me back to where I was originally, manually finding
and typing in all possible 232 colors, which I understandably want to
avoid. However, I just thought of another possible reason why the
colors are coming out wrong. Maybe I'm getting them wrong? I'm no C
programmer, so I may be misunderstanding the fltk code you posted. I'm
doing this in perl. I grab my color number (generally a negative
number, though I have found a few positives, and those are coming out
correct), and I have an array called $colormap that is the fltk
colormap. Then I do the following to get the correct item from the
array:
if ($color < 0) {
$color = -$color;
$c1 = $color >> 4;
$c2 = $color & 15;
$color = ($c1 + $c2)/2;
}
$color = $colormap[$color];
Is that the wrong way to do it?
Cheers,
Caleb
>
> --
> Joshua D. Boyd
> _______________________________________________
> GEEKS: http://www.sunhelp.org/mailman/listinfo/geeks
--
More information about the geeks
mailing list