This commit is contained in:
Pilzinsel64
2024-07-29 09:56:06 +02:00
parent 1142c6d48d
commit eba14dc2b7
5 changed files with 7 additions and 5 deletions

View File

@@ -0,0 +1,18 @@
using Telerik.WinControls;
using Telerik.WinControls.Svg;
namespace Pilz.UI.Telerik.Extensions;
public static class RadSvgImageExtensions
{
public static Image ToImage(this RadSvgImage svg)
{
return svg.Document.Draw(svg.Width, svg.Height);
}
public static void ApplyColor(this RadSvgImage svg, Color color)
{
svg.Document.Fill = new SvgColourServer(color);
svg.ClearCache();
}
}