diff options
author | marha <marha@users.sourceforge.net> | 2012-04-10 15:05:45 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-04-10 15:05:45 +0200 |
commit | 4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8 (patch) | |
tree | 3ddf28be6916dd5ea27837431b5be8c94017cd9a /libXrender/src/Color.c | |
parent | 5564e91e3cf4ba5cb2fbebbc2d63d18f588016b8 (diff) | |
parent | 5f8448ef6b85a9ff72c5af4cec99183c8bb60dc6 (diff) | |
download | vcxsrv-4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8.tar.gz vcxsrv-4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8.tar.bz2 vcxsrv-4b35ef19b76849cbd854c3b6f92bbc1c2d50f2d8.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'libXrender/src/Color.c')
-rw-r--r-- | libXrender/src/Color.c | 12 |
1 files changed, 6 insertions, 6 deletions
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; } |