emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs canvas support


From: Juri Linkov
Subject: Re: Emacs canvas support
Date: Thu, 30 Apr 2020 23:20:18 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> > I'd appreciate some feedback on something I came up with during my spare
>> > time: Emacs canvas support.
>>
>> Great, thanks!  I'm going to try to use canvas-rounded-rectangle
>> for rounded corners of tabs.  Sometime ago I tried to draw them
>> with Cairo, but the implementation was too ah-hoc.  Whereas your
>> solution is more generally usable.
>
> Did you try using svg.el?

I tried, but svg is not great, it has many unfixed problems with scaling
and backgrounds.  OTOH, I hope with canvas it would be easy to draw such
shapes around the tab name like in web browsers shown below, and also
to implement overlapping tabs.  At least canvas in web browsers allow
doing such custom drawings.

As for the implementation, there is already Cairo code used to draw 3D box
shapes around strings with box faces in xterm.c.  Canvas could be
implemented to generalize these hard-coded shapes and expose their
definitions to Lisp as configurable options.

PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]