swaywm / swaybg

Wallpaper tool for Wayland compositors
MIT License
490 stars 31 forks source link

Render SVG files at output resolution #60

Open mstoeckl opened 1 year ago

mstoeckl commented 1 year ago

At the moment, when an SVG file is loaded, it is rendered as an image at the document size; this rendered image is then up- or downscaled onto the buffer for the destination output. It would be better to render the SVG file directly onto the output's wl_buffer.

Example branch to show one way to implement this: https://github.com/mstoeckl/swaybg/tree/svg-direct

Note: At the moment, librsvg does not support image-rendering: pixelated, which could be useful as a way to display pixel art with nearest-neighbor upscaling. However, with tools like https://github.com/tinychameleon/blocky, it is still possible to emulate the nearest neighbor scaling method.

RunningDroid commented 11 months ago

@mstoeckl librsvg appears to support image-rendering: pixelated now (as of 2.57.0)