From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: esabof@gmail.com Newsgroups: gmane.emacs.help Subject: Re: Render a buffer or string to a simpler string? Date: Sun, 26 May 2013 10:56:03 -0700 (PDT) Message-ID: <114b888b-eecb-4503-a7a1-9ec09a9e9a05@googlegroups.com> References: <87bo7yq2az.fsf@yandex.ru> <83d2serd46.fsf@gnu.org> <87vc66d96b.fsf@yandex.ru> <83a9niqwsa.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1369617253 14512 80.91.229.3 (27 May 2013 01:14:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 May 2013 01:14:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 27 03:14:13 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ugm0o-0008Dh-Ux for geh-help-gnu-emacs@m.gmane.org; Mon, 27 May 2013 03:14:11 +0200 Original-Received: from localhost ([::1]:38290 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ugm0o-0008BR-FN for geh-help-gnu-emacs@m.gmane.org; Sun, 26 May 2013 21:14:10 -0400 X-Received: by 10.224.53.198 with SMTP id n6mr10219108qag.2.1369590963338; Sun, 26 May 2013 10:56:03 -0700 (PDT) X-Received: by 10.49.94.18 with SMTP id cy18mr2066754qeb.14.1369590963281; Sun, 26 May 2013 10:56:03 -0700 (PDT) Original-Path: usenet.stanford.edu!t14no861939qam.0!news-out.google.com!y6ni51517qax.0!nntp.google.com!ch1no1243074qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=86.3.182.83; posting-account=hvyt3AoAAAAdOSTOoji20fUtIaG9BH0F Original-NNTP-Posting-Host: 86.3.182.83 User-Agent: G2/1.0 Injection-Date: Sun, 26 May 2013 17:56:03 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:198812 X-Mailman-Approved-At: Sun, 26 May 2013 21:13:54 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:91081 Archived-At: > Maybe we could provide some way to "render to Elisp", which would >=20 > provide access to the glyph matrix somehow (probably exporting it as, >=20 > say, an array of "glyphs"). I'd imagine an interface along the lines of >=20 > "(render-to-lisp START END &optional WINDOW)" to render a particular >=20 > region of the current buffer as it would be displayed in WINDOW. >=20 >=20 >=20 > Obviously, some ERT tests could use such a feature, but things like >=20 > htmlfontify could probably also make use of it. Another primitive which I think doesn't exist, is given a position, return = it's pixel coordinates. From this one could construct things like region-pi= xel-width and region-pixel-height. It might also be useful to be able to store frame renderings as images and = compare them. This would also allow a somewhat grotesque way to do transpar= ency. (Save the image (which I think is already possible), overlay the buff= er with a SVG, include the rendering in the SVG and render whatever necessa= ry ontop of it). Evgeni