From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Printing Date: Sat, 4 Apr 2009 08:54:32 +0200 Message-ID: References: <5f0660120903280331y780c80b7i57a8115dc4b029eb@mail.gmail.com> <49CE3A84.9070705@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1238828096 16068 80.91.229.12 (4 Apr 2009 06:54:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Apr 2009 06:54:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: YAMAMOTO Mitsuharu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 04 08:56:14 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LpznX-0000GI-HJ for ged-emacs-devel@m.gmane.org; Sat, 04 Apr 2009 08:56:11 +0200 Original-Received: from localhost ([127.0.0.1]:47029 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lpzm9-0001Hh-Lc for ged-emacs-devel@m.gmane.org; Sat, 04 Apr 2009 02:54:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lpzm4-0001HL-Ny for emacs-devel@gnu.org; Sat, 04 Apr 2009 02:54:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lpzm0-0001Gy-Ba for emacs-devel@gnu.org; Sat, 04 Apr 2009 02:54:40 -0400 Original-Received: from [199.232.76.173] (port=41294 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lpzm0-0001Gv-60 for emacs-devel@gnu.org; Sat, 04 Apr 2009 02:54:36 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:21436) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lpzlz-0006H8-JM for emacs-devel@gnu.org; Sat, 04 Apr 2009 02:54:35 -0400 Original-Received: from mail-bw0-f167.google.com ([209.85.218.167]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lpzly-00080T-Bi for emacs-devel@gnu.org; Sat, 04 Apr 2009 02:54:34 -0400 Original-Received: by bwz11 with SMTP id 11so1263873bwz.42 for ; Fri, 03 Apr 2009 23:54:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=06Y+v+BubtxdRLPUyzUxXn3iacZlw6X/Et942e+y2Ig=; b=HkAlHoNXRrWqGOR9q4d/VwSRR0fX9J49Zi2cgryVP0aRMQOYoubjqxZvREdp+CMp+/ fAifo/VKOBZ2S3RBb1xPDb+jsY/5knMu6GSsbT5NrI6iITLR0zqgkrrzcQmMT0p/loUK Qumq8WHb8YYCEu7CXurIt1u27igiWelRGrE5Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=DusgBpHKZfUhYSxGpXGf1fArBuom5gBaNPxHT1KWhPzFYY6mfEhMfBrkaNt26nK4PZ f6zDWlKDfTNyqT8rq/Aq3La6/0hk+oYmvUvyzLVbSEW5/ka/zq6nX7kbJjIC0W6vsVUx vdID7b6MiMr3GoFwWIUP3quyKSxf/HHN2Hu4A= Original-Received: by 10.223.126.66 with SMTP id b2mr1756254fas.18.1238828072833; Fri, 03 Apr 2009 23:54:32 -0700 (PDT) In-Reply-To: X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:110057 Archived-At: On Sat, Apr 4, 2009 at 4:44 AM, YAMAMOTO Mitsuharu wrote: >>>>>> On Thu, 02 Apr 2009 18:39:24 +0900, YAMAMOTO Mitsuharu said: > >> I tried making a really preliminary proof-of-concept cairo port. :-) >> It's still rough and has several glitches/limitations, but at least >> it can generate a "resolution-independent screenshot" PDF as >> attached. =C2=A0Maybe I'll clean up the code this weekend and hopefully >> post a patch. > > Here's the patch for the Emacs 23.0.92 pretest (not the trunk HEAD). > > * No configure support. =C2=A0The easiest way would be to compile it with > =C2=A0the GTK+ support that is already linked with cairo libs. =C2=A0Add > =C2=A0-DUSE_CAIRO to CFLAGS to activate the cairo code. > > * With an experimental function (x-export-frame-image FRAME TYPE), you > =C2=A0can get the current FRAME screenshot as a unibyte string in TYPE > =C2=A0format. =C2=A0TYPE can be 'pdf, 'ps, 'png, or 'svg if the installed= cairo > =C2=A0supports their formats. > > * Currently, texts, rectangles (filling and stroking), and trapezoids > =C2=A0for reliefs are drawn using cairo by hooking the corresponding > =C2=A0drawing routine calls in xterm.c. =C2=A0They use X11 GC (with exten= sion > =C2=A0data) for colors and clipping rectangles, but operations on them ca= n > =C2=A0easily be ported to non-X11 (e.g., terminal-only) environments just > =C2=A0like the Carbon port. > > * Images could also be drawn with cairo, but I didn't do that because > =C2=A0the image drawing in xterm.c depends on X-specific data structures. > =C2=A0As a result, you can't see any images in the exported screenshot as > =C2=A0of now. > > * Stipples are ignored (both on screen and exported one). > > * Exported png images seem to be incorrect in some cases. =C2=A0I suspect > =C2=A0it has something to do with cairo's cluttering the activated FT_Siz= e > =C2=A0mentioned in ftcrfont.c, but I'm not sure. Does this work on w32?