I completely missed this one :-(. Sorry. My image approach is what you mean with svg-like one. I think both approaches would be useful for different purposes. -------- Originalmeddelande -------- Från: Stefan Monnier Datum: 2020-10-14 19:02 (GMT+01:00) Till: Eli Zaretskii Kopia: qhong@mit.edu, Akira Kyle , emacs-devel@gnu.org Ämne: Re: Rethinking the design of xwidgets >> Wouldn't it be fun to be able to free form draw inside emacs? :) > It's a long-time feature request. It is non-trivial to implement, > because this must be somehow coordinated with the display engine, so > it doesn't overwrite some of the drawing. Work in this area would be > very welcome. Indeed, it would be highly welcome. I can see 2 ways to integrate it into Emacs: - do something like the SVG images. To the extent we already have SVG images, the potential gains here are gains in performance, mostly, but there could also be potential gains in being able to easily find the "object" closest to a click. - offer a "transparent" canvas that is drawn *over* the normal text. I.e. have the normal redisplay draw a window's content into a pixmap rather than onto the glass, then draw the canvas into another pixmap, then combine the two pixmaps onto the glass. To be most useful, the second option would probably want to have some kind of access to information about the text that was drawn by the normal redisplay (e.g. maybe something similar to `posn-at-x-y` and `posn-at-point`), so you can move objects in the canvas according to the position of particular text elements in the buffer. Stefan