浏览代码

Removed redundant params.

And added file headers etc.
Steven Kirk 10 年之前
父节点
当前提交
7bee5a79ec

+ 9 - 5
src/Windows/Perspex.Direct2D1/Media/BrushImpl.cs

@@ -1,19 +1,23 @@
-using System;
+// -----------------------------------------------------------------------
+// <copyright file="BrushImpl.cs" company="Steven Kirk">
+// Copyright 2015 MIT Licence. See licence.md for more information.
+// </copyright>
+// -----------------------------------------------------------------------
 
 
 namespace Perspex.Direct2D1.Media
 namespace Perspex.Direct2D1.Media
 {
 {
+    using System;
+
     public abstract class BrushImpl : IDisposable
     public abstract class BrushImpl : IDisposable
     {
     {
         public SharpDX.Direct2D1.Brush PlatformBrush { get; set; }
         public SharpDX.Direct2D1.Brush PlatformBrush { get; set; }
 
 
-        public BrushImpl(Perspex.Media.Brush brush, SharpDX.Direct2D1.RenderTarget target, Size destinationSize)
-        {
-        }
-
         public virtual void Dispose()
         public virtual void Dispose()
         {
         {
             if (this.PlatformBrush != null)
             if (this.PlatformBrush != null)
+            {
                 this.PlatformBrush.Dispose();
                 this.PlatformBrush.Dispose();
+            }
         }
         }
     }
     }
 }
 }

+ 2 - 2
src/Windows/Perspex.Direct2D1/Media/DrawingContext.cs

@@ -267,7 +267,7 @@ namespace Perspex.Direct2D1.Media
 
 
             if (solidColorBrush != null)
             if (solidColorBrush != null)
             {
             {
-                return new SolidColorBrushImpl(solidColorBrush, this.renderTarget, destinationSize);
+                return new SolidColorBrushImpl(solidColorBrush, this.renderTarget);
             }
             }
             else if (linearGradientBrush != null)
             else if (linearGradientBrush != null)
             {
             {
@@ -275,7 +275,7 @@ namespace Perspex.Direct2D1.Media
             }
             }
             else
             else
             {
             {
-                return new SolidColorBrushImpl(null, this.renderTarget, destinationSize);
+                return new SolidColorBrushImpl(null, this.renderTarget);
             }
             }
         }
         }
     }
     }

+ 4 - 2
src/Windows/Perspex.Direct2D1/Media/LinearGradientBrushImpl.cs

@@ -8,8 +8,10 @@
 
 
     public class LinearGradientBrushImpl : BrushImpl
     public class LinearGradientBrushImpl : BrushImpl
     {
     {
-        public LinearGradientBrushImpl(Perspex.Media.LinearGradientBrush brush, SharpDX.Direct2D1.RenderTarget target, Size destinationSize)
-            : base(brush, target, destinationSize)
+        public LinearGradientBrushImpl(
+            Perspex.Media.LinearGradientBrush brush, 
+            SharpDX.Direct2D1.RenderTarget target, 
+            Size destinationSize)
         {
         {
             if (brush != null)
             if (brush != null)
             {
             {

+ 8 - 9
src/Windows/Perspex.Direct2D1/Media/SolidColorBrushImpl.cs

@@ -1,15 +1,14 @@
-namespace Perspex.Direct2D1.Media
-{
-    using System;
-    using System.Collections.Generic;
-    using System.Linq;
-    using System.Text;
-    using System.Threading.Tasks;
+// -----------------------------------------------------------------------
+// <copyright file="SolidColorBrushImpl.cs" company="Steven Kirk">
+// Copyright 2015 MIT Licence. See licence.md for more information.
+// </copyright>
+// -----------------------------------------------------------------------
 
 
+namespace Perspex.Direct2D1.Media
+{
     public class SolidColorBrushImpl : BrushImpl
     public class SolidColorBrushImpl : BrushImpl
     {
     {
-        public SolidColorBrushImpl(Perspex.Media.SolidColorBrush brush, SharpDX.Direct2D1.RenderTarget target, Size destinationSize)
-            : base(brush, target, destinationSize)
+        public SolidColorBrushImpl(Perspex.Media.SolidColorBrush brush, SharpDX.Direct2D1.RenderTarget target)
         {
         {
             this.PlatformBrush = new SharpDX.Direct2D1.SolidColorBrush(target, brush?.Color.ToDirect2D() ?? new SharpDX.Color4());
             this.PlatformBrush = new SharpDX.Direct2D1.SolidColorBrush(target, brush?.Color.ToDirect2D() ?? new SharpDX.Color4());
         }
         }