On Thu, 21 Feb 2008 14:49:12 -0500 rgheck <[EMAIL PROTECTED]> wrote: > Abdelrazak Younes wrote: > > Richard Heck wrote: > >> Richard Heck wrote: > >>> José Matos wrote: > >>>> After Richard fix I get an assertion. > >>>> > >>>> > >>> The problem is that lcolor.getX11Name(Color_shadedbg), on > >>> LaTeXFeatures line 636, is returning "red". I'll look to see why > >>> this is, but maybe someone else knows? > >>> > >> This just looks like bad code: > >> LaTeXFeatures.cpp: 636: RGBColor c = > >> rgbFromHexName(lcolor.getX11Name(Color_shadedbg)) > >> but code that wasn't previously triggered, when it should have been. > >> getX11name() will often (even usually) return something that isn't > >> suitable input for rgbFromHexName(). In this case: > >> Color.cpp:113: { Color_shadedbg, N_("shaded box"), "shaded", > >> "red", "shaded" }, > >> so it returns "red". > >> > >> I'm guessing this code wasn't previously triggered because of > >> something to do with missing InsetLayouts. > >> > >> I don't know enough about the color stuff to fix this quickly, but > >> someone else does, I hope. Yes? > > Maybe Juergen or Uwe? > > Or JMarc or Andre? > > For what it's worth, it looks as if we need either (a) some routine that > will take these "named" colors and spit out their hex equivalents,
The X system should have a routine for doing that... I am surprised at all these calls to rgbFromHexName that obviously require a hex argument, yet the getX11Name routine obviously was intended to return an official X11 name if one exists; see the system file /usr/lib/X11/rgb.txt. I have a recollection that at one time (when Angus was around) a system conversion routine X -> rgb was being called for this based on this file. > or we > need ColorSet::ColorSet() to include the hex values directly. Or else we > need to hardcode the hex values where they're wanted. Rather not. The ColorSet list should be able to contain official X11 names at that position. > rh - Martin