added support for the "transparent" color name.

2004-07-23  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimprgb-parse.c (gimp_rgba_parse_css): added support
	for the "transparent" color name.
This commit is contained in:
Sven Neumann 2004-07-22 22:29:54 +00:00 committed by Sven Neumann
parent 75565f28f3
commit a28122f8db
2 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2004-07-23 Sven Neumann <sven@gimp.org>
* libgimpcolor/gimprgb-parse.c (gimp_rgba_parse_css): added support
for the "transparent" color name.
2004-07-22 Sven Neumann <sven@gimp.org>
* libgimpcolor/gimprgb-parse.c

View File

@ -199,7 +199,15 @@ gimp_rgba_parse_css (GimpRGB *rgba,
tmp = gimp_rgb_parse_strip (css, len);
result = gimp_rgba_parse_css_internal (rgba, tmp);
if (strcmp (tmp, "transparent") == 0)
{
gimp_rgba_set (rgba, 0.0, 0.0, 0.0, 0.0);
result = TRUE;
}
else
{
result = gimp_rgba_parse_css_internal (rgba, tmp);
}
g_free (tmp);