]> git.lyx.org Git - lyx.git/commitdiff
(John): Enable the libXPM-based loader to cope with "opaque" as a colour.
authorAngus Leeming <leeming@lyx.org>
Mon, 29 Apr 2002 09:12:26 +0000 (09:12 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 29 Apr 2002 09:12:26 +0000 (09:12 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4083 a592a061-630c-0410-9148-cb99ea01b6c8

src/graphics/ChangeLog
src/graphics/GraphicsImageXPM.C

index 7d32da96f4789bbf092b4274c3567709e44eec4f..6f4eb7b79a8c36535afac46af4bd07693df451df 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-28  John Levon  <moz@compsoc.man.ac.uk>
+
+       * GraphicsImageXPM.C: understand convert's use of "opaque"
+         as a colour name
+
 2002-04-19  Marco Morandini <morandini@aero.polimi.it>
 
        * GraphicsCache.[Ch] (loadableFormats): new method. A wrapper for
index 23f0c3b69cf31113ba1d8a67b4dd57e6452ae775..44850cbaf414a2c4aeb725d8e35e0ccf727101ab 100644 (file)
@@ -188,13 +188,18 @@ bool GImageXPM::setPixmap(GParams const & params)
        attrib.valuemask |= XpmColorKey;
 
        // Set the color "none" entry to the color of the background.
-       XpmColorSymbol xpm_col;
-       xpm_col.name = 0;
-       xpm_col.value = "none";
-       xpm_col.pixel = lyxColorHandler->colorPixel(LColor::graphicsbg);
-
-       attrib.numsymbols = 1;
-       attrib.colorsymbols = &xpm_col;
+       XpmColorSymbol xpm_col[2];
+       xpm_col[0].name = 0;
+       xpm_col[0].value = "none";
+       xpm_col[0].pixel = lyxColorHandler->colorPixel(LColor::graphicsbg);
+
+       // some image magick versions use this
+       xpm_col[1].name = 0;
+       xpm_col[1].value = "opaque";
+       xpm_col[1].pixel = lyxColorHandler->colorPixel(LColor::white);
+
+       attrib.numsymbols = 2;
+       attrib.colorsymbols = xpm_col;
        attrib.valuemask |= XpmColorSymbols;
 
        // Load up the pixmap