From b392ceb6e45753672f95ccbf8c9433ba8abc5009 Mon Sep 17 00:00:00 2001 From: Darth Affe Date: Sat, 10 Sep 2016 18:50:56 +0200 Subject: [PATCH] Added operators for lazy guyz --- Brushes/SolidColorBrush.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Brushes/SolidColorBrush.cs b/Brushes/SolidColorBrush.cs index 0d4ec68..6d20a81 100644 --- a/Brushes/SolidColorBrush.cs +++ b/Brushes/SolidColorBrush.cs @@ -11,7 +11,7 @@ namespace CUE.NET.Brushes public class SolidColorBrush : AbstractBrush { #region Properties & Fields - + /// /// Gets or sets the color drawn by the brush. /// @@ -46,5 +46,19 @@ namespace CUE.NET.Brushes } #endregion + + #region Operators + + public static explicit operator SolidColorBrush(Color color) + { + return new SolidColorBrush(color); + } + + public static implicit operator Color(SolidColorBrush brush) + { + return brush.Color; + } + + #endregion } } \ No newline at end of file