SVG effects in GNU Emacs
Emacs is quite a capable SVG renderer - thanks to librsvg. You can render SVG filters (blur and shadow) and gradients (linear and radial) in Emacs buffer to create attractive UI as you like it. These are defined in variable image-svg-defs which can be reused using SVG fill attribute (fill:"url(#grad1)").
The tree structure is created using speedbar. Speedbar uses ezimage to create the icons from images. In Text UI, icons are turned off. You can also turn it off by setting ezimage-use-images to nil.
If you are maintaining your SVG icons as a sprite sheet, you can use <use/> tag to easily include icons. You can also look at SVG widget option for automated widget generation.
Note: Emacs caches images against image-spec. Use image-flush to clear cache selectively.
Code:
https://gitlab.com/atamariya/emacs/-/blob/dev/src/image.c
https://gitlab.com/atamariya/emacs/-/blob/dev/lisp/image.el
https://gitlab.com/atamariya/emacs/-/blob/dev/lisp/ezimage.el
https://gitlab.com/atamariya/emacs/-/blob/dev/lisp/speedbar.el
https://gitlab.com/atamariya/emacs/-/blob/dev/lisp/cedet/semantic/sb.el
Comments
Post a Comment