Posts

Showing posts with the label filter

SVG effects in GNU Emacs

Image
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.   ;;  image-svg-icon assigns a default icon class to tthe image which can be suitably styled (insert-image (image-svg-icon '("bi file-x") 100 100 ".icon{stroke:red}"))   ;; Example using CSS style definition (insert-image (image-svg-icon '("bi file-x...