> Hmmm.... Are you rebuilding a lyx rpm or compiling sources?   Was there
> only one xforms library that LyX could be finding?  If recompiling sources
> did you do a "make distclean" in case you still had object files in the
> src/ directory and then "./configure" again? 
> 
> Allan. (ARRae)


Ok. I was getting very sloppy and left the RPM versions installed, and
then installed the tarball distribution assuming it would overwrite the
RPM.  Anyway, I cleaned all signs of xforms and lyx from my system and
compiled from scratch (bxform-088-glibc2.1.tgz and lyx-1.0.3.tar.gz) and
it worked fine at 8, 16, and 32bpp.

I modified figinset.C (diff is below, more elegant than before) and
recompiled. This also ran properly, and correctly rendered color EPS
figures at all resolutions tested: 8, 16, 32bpp

Unless anybody has had any problems, I suppose this patch is good.

Dan


--- figinset.C.orig     Fri Jul 30 11:24:27 1999
+++ figinset.C  Fri Jul 30 11:28:40 1999
@@ -109,6 +109,7 @@
 static char bittable[256];     /* bit reversion table */
 
 static bool gs_color;                  // do we allocate colors for gs?
+static bool color_visual;              // is the visual color?
 static bool gs_xcolor = false;         // allocated extended colors
 static unsigned long gs_pixels[128];   // allocated pixels
 static int gs_num_pixels;              // number of pixels allocated
@@ -387,6 +388,10 @@
                       vi->visualid, vi->c_class, 
                       vi->bits_per_rgb, vi->map_entries);
        }
+       color_visual = ( (vi->c_class == StaticColor) ||
+               (vi->c_class == PseudoColor) ||
+               (vi->c_class == TrueColor) ||
+               (vi->c_class == DirectColor) );
        if ((vi->c_class & 1) == 0) return;
        // now allocate colors
        if (vi->c_class == GrayScale) {
@@ -618,7 +623,7 @@
                        case 1: tbuf[0] = 'M'; break; // Mono
                        case 2: tbuf[0] = 'G'; break; // Gray
                        case 3:
-                               if (gs_color && !gs_gray) 
+                               if (color_visual) 
                                        tbuf[0] = 'C'; // Color
                                else 
                                        tbuf[0] = 'G'; // Gray

Reply via email to