Compilation fix (I broke, I fixed).

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
This commit is contained in:
Baruch Even 2001-07-29 07:29:09 +00:00
parent 88821570ee
commit 67903edc17
3 changed files with 16 additions and 3 deletions

View 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,

View 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) "

View 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;
}