better svg coloring

This commit is contained in:
Pilzinsel64
2024-09-02 15:06:17 +02:00
parent 7a94fcf360
commit 90aea58d71

View File

@@ -13,6 +13,11 @@ public static class RadSvgImageExtensions
public static void ApplyColor(this RadSvgImage svg, Color color) public static void ApplyColor(this RadSvgImage svg, Color color)
{ {
svg.Document.Fill = new SvgColourServer(color); svg.Document.Fill = new SvgColourServer(color);
svg.Document.ApplyRecursive(e =>
{
e.Fill = new SvgColourServer(color);
e.Stroke = new SvgColourServer(color);
});
svg.ClearCache(); svg.ClearCache();
} }
} }