bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#616: 23.0.60; Emacs.app does not support SVG file type


From: Yavor Doganov
Subject: bug#616: 23.0.60; Emacs.app does not support SVG file type
Date: Wed, 12 Nov 2008 14:41:36 +0200
User-agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/22.2 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Sun, 27 Jul 2008 12:36:30 +0200,
Peter Dyballa wrote:
> 
> The value of image-types ist just (png gif tiff jpeg xpm xbm pbm).  

I've been using the attached patch on GNUstep for some time, with no
apparent ill effects.  The only problem is that transparent images
(like splash.svg, gnus.svg, etc.) get rendered on a black backround.

If I set the Emacs background to black, they look transparent but
that's of course an illusion.  I tried several approaches to make it
work, but did not succeed.  I hope that someone else does.


2008-11-12  Yavor Doganov  <yavor@gnu.org>  (tiny change)

        * configure.in: Check for librsvg2 under NS as well.

2008-11-12  Yavor Doganov  <yavor@gnu.org>  (tiny change)

        * image.c (svg_load_image): Add support for NS.

Index: configure.in
===================================================================
RCS file: /sources/emacs/emacs/configure.in,v
retrieving revision 1.572
diff -u -u -r1.572 configure.in
--- configure.in        24 Oct 2008 07:22:35 -0000      1.572
+++ configure.in        24 Oct 2008 18:12:31 -0000
@@ -1491,7 +1491,7 @@
 
 ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
 HAVE_RSVG=no
-if test "${HAVE_X11}" = "yes"; then
+if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
   if test "${with_rsvg}" != "no"; then
     RSVG_REQUIRED=2.0.0
     RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"

Index: src/image.c
===================================================================
RCS file: /sources/emacs/emacs/src/image.c,v
retrieving revision 1.114
diff -u -u -r1.114 image.c
--- src/image.c 3 Oct 2008 18:23:43 -0000       1.114
+++ src/image.c 24 Oct 2008 18:12:49 -0000
@@ -8127,6 +8127,11 @@
       background.red   >>= 8;
       background.green >>= 8;
       background.blue  >>= 8;
+#elif defined (HAVE_NS)
+      background.pixel = FRAME_BACKGROUND_PIXEL (f);
+      background.red   = RED_FROM_ULONG (background.pixel);
+      background.green = GREEN_FROM_ULONG (background.pixel);
+      background.blue  = BLUE_FROM_ULONG (background.pixel);
 #else /* not HAVE_X_WINDOWS*/
 #error FIXME
 #endif
@@ -8174,9 +8179,11 @@
   img->width  = width;
   img->height = height;
 
+#ifndef HAVE_NS
   /* Maybe fill in the background field while we have ximg handy.
      Casting avoids a GCC warning.  */
   IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg);
+#endif
 
   /* Put the image into the pixmap, then free the X image and its
      buffer.  */






reply via email to

[Prev in Thread] Current Thread [Next in Thread]