diff options
author | Javier Jardón <jjardon@gnome.org> | 2011-06-06 16:47:40 +0100 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2011-06-13 00:24:53 +0100 |
commit | 85747da97238dc101f92cd8241aa7aea44f35789 (patch) | |
tree | d59074f66bb570662e2407c361ee5327211d65c3 /tests/testcombo.c | |
parent | 4a9bd917a0f1edd4a578d81f8433b14877728bba (diff) | |
download | gtk+-85747da97238dc101f92cd8241aa7aea44f35789.tar.gz |
tests: use GdkRGBA instead GdkColor
Diffstat (limited to 'tests/testcombo.c')
-rw-r--r-- | tests/testcombo.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/testcombo.c b/tests/testcombo.c index b1bb7f94ba..2a9c527b4c 100644 --- a/tests/testcombo.c +++ b/tests/testcombo.c @@ -31,13 +31,13 @@ static GdkPixbuf * create_color_pixbuf (const char *color) { GdkPixbuf *pixbuf; - GdkColor col; + GdkRGBA rgba; int x; int num; guchar *pixels, *p; - if (!gdk_color_parse (color, &col)) + if (!gdk_rgba_parse (&rgba, color)) return NULL; pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, @@ -50,9 +50,9 @@ create_color_pixbuf (const char *color) gdk_pixbuf_get_height (pixbuf); for (x = 0; x < num; x++) { - p[0] = col.red / 65535 * 255; - p[1] = col.green / 65535 * 255; - p[2] = col.blue / 65535 * 255; + p[0] = rgba.red * 255; + p[1] = rgba.green * 255; + p[2] = rgba.blue * 255; p += 3; } |