From 5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6 Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 10 Apr 2012 14:58:33 +0200 Subject: Updated following packages: bigreqsproto-1.1.2 fontsproto-2.1.2 recordproto-1.14.2 scrnsaverproto-1.2.2 xcmiscproto-1.2.2 libXt-1.1.3 xhost-1.0.5 kbproto-1.0.6 libXrender-0.9.7 libxkbfile-1.0.8 freetype-2.4.9 libXaw-1.0.10 libXpm-3.5.10 xproto-7.0.23 --- libXrender/src/Color.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libXrender/src/Color.c') diff --git a/libXrender/src/Color.c b/libXrender/src/Color.c index 4f934f038..23ef8008b 100644 --- a/libXrender/src/Color.c +++ b/libXrender/src/Color.c @@ -29,14 +29,14 @@ Status XRenderParseColor(Display *dpy, char *spec, XRenderColor *def) { - + if (!strncmp (spec, "rgba:", 5)) { unsigned short elements[4]; unsigned short *pShort; int i, n; char c; - + spec += 5; /* * Attempt to parse the value portion. @@ -76,7 +76,7 @@ XRenderParseColor(Display *dpy, char *spec, XRenderColor *def) { XColor coreColor; Colormap colormap; - + colormap = DefaultColormap (dpy, DefaultScreen (dpy)); if (!XParseColor (dpy, colormap, spec, &coreColor)) return 0; @@ -85,8 +85,8 @@ XRenderParseColor(Display *dpy, char *spec, XRenderColor *def) def->blue = coreColor.blue; def->alpha = 0xffff; } - def->red = (def->red * def->alpha) / 65535; - def->green = (def->green * def->alpha) / 65535; - def->blue = (def->blue * def->alpha) / 65535; + def->red = (def->red * def->alpha) / 0xffffU; + def->green = (def->green * def->alpha) / 0xffffU; + def->blue = (def->blue * def->alpha) / 0xffffU; return 1; } -- cgit v1.2.3