Started off as a quick improvement to the usage of SkiaSharp to save files, but became... well... more. 😎
Saving files
Instead of using the "native" Svg.Skia way of saving files, I switched to daring it myself to reduce the number of copies and transforms. Now there is just a single set of allocation, draw and encode. We first allocate the new, resized icon, then we draw the scaled icon, and finally encode directly to a file stream.
Unit tests
...
TintColor support
In order to show off the coolness of SkiaSharp, I quickly added a few lines of SkiaSharp to get 100% tint-able SVG.
Started off as a quick improvement to the usage of SkiaSharp to save files, but became... well... more. 😎
Saving files Instead of using the "native" Svg.Skia way of saving files, I switched to daring it myself to reduce the number of copies and transforms. Now there is just a single set of allocation, draw and encode. We first allocate the new, resized icon, then we draw the scaled icon, and finally encode directly to a file stream.
Unit tests ...
TintColor support In order to show off the coolness of SkiaSharp, I quickly added a few lines of SkiaSharp to get 100% tint-able SVG.