Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37745209
en ru br
Репозитории ALT
S:1.17.0-alt9
5.1: 1.17.0-alt8
4.1: 1.17.0-alt6
4.0: 1.17.0-alt6
3.0: 1.17.0-alt6
www.altlinux.org/Changes

Группа :: Графика
Пакет: xli

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: 100-xpm_background.patch
Скачать


Adds support for the special "None" colour in XPMs by
replacing them with the -background color. by Bernhard R. Link in #220965
Index: xli-1.17.0+20061110/xpixmap.c
===================================================================
--- xli-1.17.0+20061110.orig/xpixmap.c
+++ xli-1.17.0+20061110/xpixmap.c
@@ -463,7 +463,16 @@ Image *xpixmapLoad(char *fullname, Image
 			} else
 				p = buf;
 
-			if (!xliParseXColor(&globals.dinfo, p, &xcolor)) {
+			if( strcmp(p, "None") == 0 ) {
+				if( image_ops->bg ) {
+					if (!xliParseXColor(&globals.dinfo, image_ops->bg, &xcolor)) {
+						fprintf(stderr, "xpixmapLoad: Bad background color name '%s'\n", image_ops->bg);
+						xcolor.red = xcolor.green = xcolor.blue = 0;
+					}
+				} else {
+					xcolor.red = xcolor.green = xcolor.blue = 0;
+				}
+			} else if (!xliParseXColor(&globals.dinfo, p, &xcolor)) {
 				fprintf(stderr, "xpixmapLoad: %s - Bad color name '%s'\n", name, p);
 				xcolor.red = xcolor.green = xcolor.blue = 0;
 			}
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin