diff options
| author | Adrian Robert | 2009-01-29 10:36:49 +0000 |
|---|---|---|
| committer | Adrian Robert | 2009-01-29 10:36:49 +0000 |
| commit | d7e008d06f649becf95349ac606946ee31c2fbee (patch) | |
| tree | b16891f09bde00d9cae2bedf9c8454107ef53a42 /src | |
| parent | fc7a54a9b867af5b56fa295667fbe251d8fea480 (diff) | |
| download | emacs-d7e008d06f649becf95349ac606946ee31c2fbee.tar.gz emacs-d7e008d06f649becf95349ac606946ee31c2fbee.zip | |
* 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.c | 14 |
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) | |||
| 8082 | if (STRINGP (specified_bg) | 8082 | if (STRINGP (specified_bg) |
| 8083 | && x_defined_color (f, SDATA (specified_bg), &background, 0)) | 8083 | && x_defined_color (f, SDATA (specified_bg), &background, 0)) |
| 8084 | { | 8084 | { |
| 8085 | /* SVG pixmaps specify transparency in the last byte, so right | ||
| 8086 | shift 8 bits to get rid of it, since emacs doesn't support | ||
| 8087 | transparency. */ | ||
| 8085 | background.red >>= 8; | 8088 | background.red >>= 8; |
| 8086 | background.green >>= 8; | 8089 | background.green >>= 8; |
| 8087 | background.blue >>= 8; | 8090 | background.blue >>= 8; |
| 8088 | } | 8091 | } |
| 8089 | else | 8092 | else |
| 8090 | { | 8093 | { |
| 8094 | #ifndef HAVE_NS | ||
| 8091 | background.pixel = FRAME_BACKGROUND_PIXEL (f); | 8095 | background.pixel = FRAME_BACKGROUND_PIXEL (f); |
| 8092 | x_query_color (f, &background); | 8096 | x_query_color (f, &background); |
| 8093 | 8097 | #else | |
| 8094 | /* SVG pixmaps specify transparency in the last byte, so right | 8098 | ns_query_color(FRAME_BACKGROUND_COLOR (f), &background, 1); |
| 8095 | shift 8 bits to get rid of it, since emacs doesn't support | 8099 | #endif |
| 8096 | transparency. */ | ||
| 8097 | background.red >>= 8; | ||
| 8098 | background.green >>= 8; | ||
| 8099 | background.blue >>= 8; | ||
| 8100 | } | 8100 | } |
| 8101 | 8101 | ||
| 8102 | /* This loop handles opacity values, since Emacs assumes | 8102 | /* This loop handles opacity values, since Emacs assumes |