code optimization

This commit is contained in:
2024-06-05 19:15:32 +02:00
parent d4be7d0566
commit 1b49c54822
151 changed files with 4124 additions and 4673 deletions

View File

@@ -1,25 +1,19 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
using Telerik.WinControls;
using Telerik.WinControls.Svg;
namespace Pilz.UI.Telerik
namespace Pilz.UI.Telerik;
public static class Extensions
{
public static class Extensions
public static Image ToImage(this RadSvgImage svg)
{
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();
}
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();
}
}