summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdrian Robert <Adrian.B.Robert@gmail.com>2009-01-29 10:36:49 +0000
committerAdrian Robert <Adrian.B.Robert@gmail.com>2009-01-29 10:36:49 +0000
commitd7e008d06f649becf95349ac606946ee31c2fbee (patch)
treeb16891f09bde00d9cae2bedf9c8454107ef53a42 /src
parentfc7a54a9b867af5b56fa295667fbe251d8fea480 (diff)
downloademacs-d7e008d06f649becf95349ac606946ee31c2fbee.tar.gz
* image.c (svg_load_image): Don't right-shift background RGB when
obtained from FRAME_BACKGROUND_PIXEL. Under HAVE_NS use ns_query_color.
Diffstat (limited to 'src')
-rw-r--r--src/image.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/image.c b/src/image.c
index 611abb82221..a02f86a9c90 100644
--- a/src/image.c
+++ b/src/image.c
@@ -8082,21 +8082,21 @@ svg_load_image (f, img, contents, size)
if (STRINGP (specified_bg)
&& x_defined_color (f, SDATA (specified_bg), &background, 0))
{
+ /* SVG pixmaps specify transparency in the last byte, so right
+ shift 8 bits to get rid of it, since emacs doesn't support
+ transparency. */
background.red >>= 8;
background.green >>= 8;
background.blue >>= 8;
}
else
{
+#ifndef HAVE_NS
background.pixel = FRAME_BACKGROUND_PIXEL (f);
x_query_color (f, &background);
-
- /* SVG pixmaps specify transparency in the last byte, so right
- shift 8 bits to get rid of it, since emacs doesn't support
- transparency. */
- background.red >>= 8;
- background.green >>= 8;
- background.blue >>= 8;
+#else
+ ns_query_color(FRAME_BACKGROUND_COLOR (f), &background, 1);
+#endif
}
/* This loop handles opacity values, since Emacs assumes