]> git.lyx.org Git - features.git/commitdiff
Compilation fix (I broke, I fixed).
authorBaruch Even <baruch@lyx.org>
Sun, 29 Jul 2001 07:29:09 +0000 (07:29 +0000)
committerBaruch Even <baruch@lyx.org>
Sun, 29 Jul 2001 07:29:09 +0000 (07:29 +0000)
Color allocation fix, made it allocate close colors too.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2380 a592a061-630c-0410-9148-cb99ea01b6c8

src/graphics/ChangeLog
src/graphics/GraphicsCacheItem.C
src/graphics/ImageLoaderXPM.C

index 896630c7fb1da79a4ba4739438cb887e2052892d..df3e9e075ff594e53e9655ced8b4184758d920f8 100644 (file)
@@ -1,3 +1,10 @@
+2001-07-29  Baruch Even  <baruch@lyx.org>
+
+       * ImageLoaderXPM.C (runImageLoader): When loading agree to use non-exact
+       colors with closeness of 10000.
+
+       * GraphicsCacheItem.C: Fixed a compilation bug introduced earlier.
+
 2001-07-29  Baruch Even  <baruch@lyx.org>
 
        * GraphicsCacheItem.C (findTargetFormat): Removed error dialog box,
index 298f8020b4e3ccd4617d0127cc129d646081e223..0def93c5a6de96846dd783858f2f500456638be2 100644 (file)
@@ -76,7 +76,11 @@ GraphicsCacheItem::getImage() const { return image_.get(); }
 void
 GraphicsCacheItem::imageConverted(bool success)
 {
-       lyxerr << "imageConverted, status=" << success << endl;
+       // Debug output
+       string text = "succeeded";
+       if (!success)
+               text = "failed";
+       lyxerr << "imageConverted, conversion " << text << "." << endl;
 
        if (! success) {
                lyxerr << "(GraphicsCacheItem::imageConverter) "
index b92a0bb0113da7c5cf6f7d91b8bda7b3b90051ee..5603203f660f8727e88a439066d696a0b65d5e3e 100644 (file)
@@ -69,7 +69,9 @@ ImageLoaderXPM::runImageLoader(string const & filename)
        Pixmap pixmap;
        Pixmap mask;
        XpmAttributes attrib;
-       attrib.valuemask = 0;
+       
+       attrib.valuemask = XpmCloseness | XpmAllocColor;
+       attrib.closeness = 10000;
        
        int status = XpmReadFileToPixmap(
                        display, 
@@ -79,7 +81,7 @@ ImageLoaderXPM::runImageLoader(string const & filename)
 
        if (status != XpmSuccess) {
                lyxerr << "Error reading XPM file '" 
-                       << XpmGetErrorString(status) 
+                       << XpmGetErrorString(status) << "'"
                        << endl;
                return ErrorWhileLoading;
        }