unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Vector graphics overlays
@ 2014-03-22  5:15 Elias Mårtenson
  2014-03-22  7:53 ` Eli Zaretskii
  2014-03-22 15:47 ` Stefan
  0 siblings, 2 replies; 8+ messages in thread
From: Elias Mårtenson @ 2014-03-22  5:15 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 961 bytes --]

A few times now, when developing Emacs modes, I have found myself wishing
that there was a way of doing graphical overlays on top of the text in a
buffer.

In one case, I wanted to draw arrows connecting elements in a Common Lisp
buffer in order to visually connect related symbols with arrows.

In other cases I have wanted to highlight sections of text using symbols
and graphics that floats on top (semi-transparent) of the text being edited.

I figured that one way of dealing with this would be to have the ability to
overlay SVG graphics on top of the text being edited. I was about to start
actually implementing this when someone pointed out to me that this would
be completely incompatible with running Emacs in text mode (although I was
thinking to myself that so is inline images, and that's a supported
feature).

What is the opinion about this? Is this something that has been discussed
previously, and if so, what was the outcome?

Regards,
Elias

[-- Attachment #2: Type: text/html, Size: 1121 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Vector graphics overlays
  2014-03-22  5:15 Vector graphics overlays Elias Mårtenson
@ 2014-03-22  7:53 ` Eli Zaretskii
  2014-03-22 11:08   ` Elias Mårtenson
  2014-03-22 15:47 ` Stefan
  1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2014-03-22  7:53 UTC (permalink / raw)
  To: Elias Mårtenson; +Cc: emacs-devel

> Date: Sat, 22 Mar 2014 13:15:44 +0800
> From: Elias Mårtenson <lokedhs@gmail.com>
> 
> I figured that one way of dealing with this would be to have the ability to
> overlay SVG graphics on top of the text being edited. I was about to start
> actually implementing this when someone pointed out to me that this would
> be completely incompatible with running Emacs in text mode (although I was
> thinking to myself that so is inline images, and that's a supported
> feature).
> 
> What is the opinion about this? Is this something that has been discussed
> previously, and if so, what was the outcome?

The question you should ask yourself is whether not showing the image
will fatally hamper whatever features you want to build on top of
that.  If it will (I don't think so), then perhaps some ASCII art
replacement for the image is in order.  If not, then this feature will
simply be unavailable on text terminals.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Vector graphics overlays
  2014-03-22  7:53 ` Eli Zaretskii
@ 2014-03-22 11:08   ` Elias Mårtenson
  2014-03-22 11:30     ` Eli Zaretskii
  2014-03-22 14:42     ` joakim
  0 siblings, 2 replies; 8+ messages in thread
From: Elias Mårtenson @ 2014-03-22 11:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 519 bytes --]

On 22 March 2014 15:53, Eli Zaretskii <eliz@gnu.org> wrote:


> The question you should ask yourself is whether not showing the image
> will fatally hamper whatever features you want to build on top of
> that.  If it will (I don't think so), then perhaps some ASCII art
> replacement for the image is in order.  If not, then this feature will
> simply be unavailable on text terminals.
>

So are you saying that if this feature in built, there would be no
principal objections to including it in Emacs?

Regards,
Elias

[-- Attachment #2: Type: text/html, Size: 959 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Vector graphics overlays
  2014-03-22 11:08   ` Elias Mårtenson
@ 2014-03-22 11:30     ` Eli Zaretskii
  2014-03-22 14:42     ` joakim
  1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2014-03-22 11:30 UTC (permalink / raw)
  To: Elias Mårtenson; +Cc: emacs-devel

> Date: Sat, 22 Mar 2014 19:08:05 +0800
> From: Elias Mårtenson <lokedhs@gmail.com>
> Cc: emacs-devel@gnu.org
> 
> > The question you should ask yourself is whether not showing the image
> > will fatally hamper whatever features you want to build on top of
> > that.  If it will (I don't think so), then perhaps some ASCII art
> > replacement for the image is in order.  If not, then this feature will
> > simply be unavailable on text terminals.
> >
> 
> So are you saying that if this feature in built, there would be no
> principal objections to including it in Emacs?

Not because it cannot display images on text terminals, no.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Vector graphics overlays
  2014-03-22 11:08   ` Elias Mårtenson
  2014-03-22 11:30     ` Eli Zaretskii
@ 2014-03-22 14:42     ` joakim
  2014-03-22 14:47       ` Elias Mårtenson
  1 sibling, 1 reply; 8+ messages in thread
From: joakim @ 2014-03-22 14:42 UTC (permalink / raw)
  To: Elias Mårtenson; +Cc: Eli Zaretskii, emacs-devel

Elias Mårtenson <lokedhs@gmail.com> writes:

> On 22 March 2014 15:53, Eli Zaretskii <eliz@gnu.org> wrote:
>
>     The question you should ask yourself is whether not showing the
>     image
>     will fatally hamper whatever features you want to build on top of
>     that. If it will (I don't think so), then perhaps some ASCII art
>     replacement for the image is in order. If not, then this feature
>     will
>     simply be unavailable on text terminals.
>     
>
> So are you saying that if this feature in built, there would be no
> principal objections to including it in Emacs?

I'm not sure what you want do achieve, but perhaps the Xwidget branch
can be of interest. In the branch its possible to embedd a webkit
browser in an emacs window, similar to an image. So, you could show svg
graphics in the webkit component.

There is also initial support to manage the DOM inside the component
from Elisp.

I also had some proof of concept support for other graphical
containers, such as a Clutter view.

>
> Regards,
> Elias
>

-- 
Joakim Verona



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Vector graphics overlays
  2014-03-22 14:42     ` joakim
@ 2014-03-22 14:47       ` Elias Mårtenson
  2014-03-22 15:15         ` joakim
  0 siblings, 1 reply; 8+ messages in thread
From: Elias Mårtenson @ 2014-03-22 14:47 UTC (permalink / raw)
  To: joakim; +Cc: Eli Zaretskii, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 764 bytes --]

On 22 March 2014 22:42, <joakim@verona.se> wrote:


> I'm not sure what you want do achieve, but perhaps the Xwidget branch
> can be of interest. In the branch its possible to embedd a webkit
> browser in an emacs window, similar to an image. So, you could show svg
> graphics in the webkit component.
>

What I want to do is more than just show graphics. I want to show overlay
graphics on top of the text. In fact, the graphics will actually (seem to)
interact with the text. In its simplest form, you might envision a box
around some text, or an arrow drawn on top of the text, pointing at a given
word.

That said, if Xwidget can provide a way to draw its stuff *on top of* the
text being edited, then it could possibly do exactly what I want.

Regards,
Elias

[-- Attachment #2: Type: text/html, Size: 1255 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Vector graphics overlays
  2014-03-22 14:47       ` Elias Mårtenson
@ 2014-03-22 15:15         ` joakim
  0 siblings, 0 replies; 8+ messages in thread
From: joakim @ 2014-03-22 15:15 UTC (permalink / raw)
  To: Elias Mårtenson; +Cc: Eli Zaretskii, emacs-devel

Elias Mårtenson <lokedhs@gmail.com> writes:

> On 22 March 2014 22:42, <joakim@verona.se> wrote:
>
>     
>     I'm not sure what you want do achieve, but perhaps the Xwidget
>     branch
>     
>     can be of interest. In the branch its possible to embedd a webkit
>     browser in an emacs window, similar to an image. So, you could
>     show svg
>     graphics in the webkit component.
>     
>
> What I want to do is more than just show graphics. I want to show
> overlay graphics on top of the text. In fact, the graphics will
> actually (seem to) interact with the text. In its simplest form, you
> might envision a box around some text, or an arrow drawn on top of the
> text, pointing at a given word.
>
> That said, if Xwidget can provide a way to draw its stuff on top of
> the text being edited, then it could possibly do exactly what I want.

You get a browser inside emacs. So, you can mix graphics and text as you
can in a browser.

The component doesnt overlay transparently on top of the emacs buffer
though. You get a component that is part of a buffer like an image,
except it is interactive.

It should be possible to do some alpha blending trickery though, if
thats what you really want.

The way the xwidget branch works, it uses offscreen buffers to create
bitmaps that are blitted to screen. This is to integrate with the emacs
display engine. One could perhaps fetch the offscreen content of an
emacs buffer to the mix.

(Your name sounds Swedish so we could discuss this off-list in Swedish
if you are further interested in this aproach)

>
> Regards,
> Elias
>

-- 
Joakim Verona



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Vector graphics overlays
  2014-03-22  5:15 Vector graphics overlays Elias Mårtenson
  2014-03-22  7:53 ` Eli Zaretskii
@ 2014-03-22 15:47 ` Stefan
  1 sibling, 0 replies; 8+ messages in thread
From: Stefan @ 2014-03-22 15:47 UTC (permalink / raw)
  To: Elias Mårtenson; +Cc: emacs-devel

> A few times now, when developing Emacs modes, I have found myself wishing
> that there was a way of doing graphical overlays on top of the text in a
> buffer.

See also http://comments.gmane.org/gmane.emacs.devel/163377.

I'd welcome such a feature.  The fact that it wouldn't work in a tty is
not a reason to turn it down.


        Stefan



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-03-22 15:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-22  5:15 Vector graphics overlays Elias Mårtenson
2014-03-22  7:53 ` Eli Zaretskii
2014-03-22 11:08   ` Elias Mårtenson
2014-03-22 11:30     ` Eli Zaretskii
2014-03-22 14:42     ` joakim
2014-03-22 14:47       ` Elias Mårtenson
2014-03-22 15:15         ` joakim
2014-03-22 15:47 ` Stefan

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).