From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Adrian Robert Newsgroups: gmane.emacs.bugs Subject: bug#616: #616 - 23.0.60; Emacs.app does not support SVG file type - Emacs bug report logs Date: Mon, 24 Nov 2008 22:19:30 -0500 Message-ID: <3F3DF4BE-B450-4FC5-A798-08ECE299A067@gmail.com> Reply-To: Adrian Robert , 616@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1227583904 27068 80.91.229.12 (25 Nov 2008 03:31:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Nov 2008 03:31:44 +0000 (UTC) Cc: Yavor Doganov To: 616@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 25 04:32:46 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L4ofJ-0007UE-NG for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Nov 2008 04:32:41 +0100 Original-Received: from localhost ([127.0.0.1]:33883 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4oeA-0000Oh-Cq for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Nov 2008 22:31:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L4odi-0000E0-8R for bug-gnu-emacs@gnu.org; Mon, 24 Nov 2008 22:31:02 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L4odg-0000CC-IL for bug-gnu-emacs@gnu.org; Mon, 24 Nov 2008 22:31:01 -0500 Original-Received: from [199.232.76.173] (port=49693 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4odg-0000By-BL for bug-gnu-emacs@gnu.org; Mon, 24 Nov 2008 22:31:00 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:52001) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L4odf-0005JL-Rl for bug-gnu-emacs@gnu.org; Mon, 24 Nov 2008 22:31:00 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAP3UARD019444; Mon, 24 Nov 2008 19:30:11 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mAP3P4bh017620; Mon, 24 Nov 2008 19:25:04 -0800 X-Loop: don@donarmstrong.com Resent-From: Adrian Robert Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , don@donarmstrong.com Resent-Date: Tue, 25 Nov 2008 03:25:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 616 X-Emacs-PR-Package: emacs,ns X-Emacs-PR-Keywords: patch Original-Received: via spool by 616-submit@emacsbugs.donarmstrong.com id=B616.122758320216186 (code B ref 616); Tue, 25 Nov 2008 03:25:04 +0000 Original-Received: (at 616) by emacsbugs.donarmstrong.com; 25 Nov 2008 03:20:02 +0000 Original-Received: from mail-qy0-f20.google.com (mail-qy0-f20.google.com [209.85.221.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAP3Jw6H016154 for <616@emacsbugs.donarmstrong.com>; Mon, 24 Nov 2008 19:19:59 -0800 Original-Received: by qyk13 with SMTP id 13so2157413qyk.1 for <616@emacsbugs.donarmstrong.com>; Mon, 24 Nov 2008 19:19:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date:cc :x-mailer; bh=t+J7nWBffIkVKz/hC/AJbFBPLt8YVmUnAUON60njwjE=; b=FEQUj1uveUVdlGIiEjLaSc/lWQhYhDfaE+1LREMooUz+87uU6/LfZyIw+icrOknxRa FBXHpI8CR649J21eeLt5zgYtyn+YRGIT4zu96WF18zkXRdYPmGq1wUnKSE3xmUp1FlNy slvA/ucrOrMFHJb4FhurRntaDRGHYwUvt5VqA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:cc:x-mailer; b=aYncOqnOWULCiecToFPwqj6syUawgYaH6zcDprQbGbM7HNNTpGTecASCnE3gC7PexN NWErLtAURKA5Ak7iLf8ewxaCJ04eGR7TTuXLuxNa6pW89flyoQXcgPywqU6DdguAUJla IuLE65GY/4ypYXHL+dfzEV9WcoYi00TYbjqF0= Original-Received: by 10.215.39.4 with SMTP id r4mr3131469qaj.121.1227583193225; Mon, 24 Nov 2008 19:19:53 -0800 (PST) Original-Received: from ?10.0.1.198? ([72.169.150.82]) by mx.google.com with ESMTPS id 4sm11068938yxj.7.2008.11.24.19.19.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 24 Nov 2008 19:19:52 -0800 (PST) X-Mailer: Apple Mail (2.929.2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Mon, 24 Nov 2008 22:31:01 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:22651 Archived-At: > 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. > > ... > > +#elif defined (HAVE_NS) > + background.pixel = FRAME_BACKGROUND_PIXEL (f); > ... The NS port doesn't use FRAME_BACKGROUND_PIXEL. One approach would be to get FRAME_BACKGROUND_COLOR (an NSColor) and extract its RGB info. Did you try this and it didn't work either? Note that simply leaving in the alpha information should also work, as the NS image code (ns_put_pixel()) supports alpha. Did you try #ifdef'ing out all of the code in that function that hacks away SVG's alpha information? I'd say this is the preferred solution. But if that doesn't work, here is some code that would use the frame background color (I'd try but don't have librsvg set up on my machine.) float r, g, b, a; NSColor *col = FRAME_BACKGROUND_COLOR(f); if (![[col colorSpaceName] isEqualToString: NSNamedColorSpace]) col = [col colorUsingColorSpaceName: NSCalibratedRGBColorSpace]; [col getRed: &r green: &g blue: &b alpha: &a]; background.red = r * 256; background.green = g * 256; background.blue = b * 256;