From fc06762f4e26032e9c87e3b085d826a37f2e22a3 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Tue, 20 Mar 2018 13:43:05 +1100 Subject: [PATCH] Fix spelling --- .../DefaultPixelBlenders.Generated.cs | 8 +++---- .../DefaultPixelBlenders.Generated.tt | 2 +- .../PorterDuffFunctions.Generated.cs | 4 ++-- .../PorterDuffFunctions.Generated.tt | 2 +- .../PixelBlenders/PorterDuffFunctions.cs | 24 +++++++++---------- .../PixelBlenders/PorterDuffFunctionsTests.cs | 2 +- .../PorterDuffFunctionsTests_TPixel.cs | 2 +- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/ImageSharp/PixelFormats/PixelBlenders/DefaultPixelBlenders.Generated.cs b/src/ImageSharp/PixelFormats/PixelBlenders/DefaultPixelBlenders.Generated.cs index d3c6cf16ce..6635a5a2a0 100644 --- a/src/ImageSharp/PixelFormats/PixelBlenders/DefaultPixelBlenders.Generated.cs +++ b/src/ImageSharp/PixelFormats/PixelBlenders/DefaultPixelBlenders.Generated.cs @@ -141,17 +141,17 @@ namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders } } - internal class Substract : PixelBlender + internal class Subtract : PixelBlender { /// /// Gets the static instance of this blender. /// - public static Substract Instance { get; } = new Substract(); + public static Subtract Instance { get; } = new Subtract(); /// public override TPixel Blend(TPixel background, TPixel source, float amount) { - return PorterDuffFunctions.Substract(background, source, amount); + return PorterDuffFunctions.Subtract(background, source, amount); } /// @@ -172,7 +172,7 @@ namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders for (int i = 0; i < destination.Length; i++) { - destinationSpan[i] = PorterDuffFunctions.Substract(backgroundSpan[i], sourceSpan[i], amount[i]); + destinationSpan[i] = PorterDuffFunctions.Subtract(backgroundSpan[i], sourceSpan[i], amount[i]); } PixelOperations.Instance.PackFromVector4(destinationSpan, destination, destination.Length); diff --git a/src/ImageSharp/PixelFormats/PixelBlenders/DefaultPixelBlenders.Generated.tt b/src/ImageSharp/PixelFormats/PixelBlenders/DefaultPixelBlenders.Generated.tt index eebee676fc..485bc31ad5 100644 --- a/src/ImageSharp/PixelFormats/PixelBlenders/DefaultPixelBlenders.Generated.tt +++ b/src/ImageSharp/PixelFormats/PixelBlenders/DefaultPixelBlenders.Generated.tt @@ -42,7 +42,7 @@ namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders "Normal", "Multiply", "Add", - "Substract", + "Subtract", "Screen", "Darken", "Lighten", diff --git a/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.Generated.cs b/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.Generated.cs index 21ae335bee..43fcc68ad9 100644 --- a/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.Generated.cs +++ b/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.Generated.cs @@ -285,11 +285,11 @@ namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static TPixel Substract(TPixel backdrop, TPixel source, float amount) + public static TPixel Subtract(TPixel backdrop, TPixel source, float amount) where TPixel : struct, IPixel { TPixel dest = default(TPixel); - dest.PackFromVector4(Substract(backdrop.ToVector4(), source.ToVector4(), amount)); + dest.PackFromVector4(Subtract(backdrop.ToVector4(), source.ToVector4(), amount)); return dest; } diff --git a/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.Generated.tt b/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.Generated.tt index c92ab6dd62..f3e0b1f174 100644 --- a/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.Generated.tt +++ b/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.Generated.tt @@ -83,7 +83,7 @@ namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders GeneratePixelBlender("Normal"); GeneratePixelBlender("Multiply"); GeneratePixelBlender("Add"); - GeneratePixelBlender("Substract"); + GeneratePixelBlender("Subtract"); GeneratePixelBlender("Screen"); GeneratePixelBlender("Darken"); GeneratePixelBlender("Lighten"); diff --git a/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.cs b/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.cs index f09d6d51ca..c47ef35a3d 100644 --- a/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.cs +++ b/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.cs @@ -23,7 +23,7 @@ namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders /// /// Source over backdrop /// - /// Backgrop color + /// Backdrop color /// Source color /// Opacity applied to Source Alpha /// Output color @@ -37,7 +37,7 @@ namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders /// /// Source multiplied by backdrop /// - /// Backgrop color + /// Backdrop color /// Source color /// Opacity applied to Source Alpha /// Output color @@ -51,7 +51,7 @@ namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders /// /// Source added to backdrop /// - /// Backgrop color + /// Backdrop color /// Source color /// Opacity applied to Source Alpha /// Output color @@ -63,14 +63,14 @@ namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders } /// - /// Source substracted from backdrop + /// Source subtracted from backdrop /// - /// Backgrop color + /// Backdrop color /// Source color /// Opacity applied to Source Alpha /// Output color [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 Substract(Vector4 backdrop, Vector4 source, float opacity) + public static Vector4 Subtract(Vector4 backdrop, Vector4 source, float opacity) { source.W *= opacity; return Compose(backdrop, source, Vector4.Max(Vector4.Zero, backdrop - source)); @@ -79,7 +79,7 @@ namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders /// /// Complement of source multiplied by the complement of backdrop /// - /// Backgrop color + /// Backdrop color /// Source color /// Opacity applied to Source Alpha /// Output color @@ -93,7 +93,7 @@ namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders /// /// Per element, chooses the smallest value of source and backdrop /// - /// Backgrop color + /// Backdrop color /// Source color /// Opacity applied to Source Alpha /// Output color @@ -107,7 +107,7 @@ namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders /// /// Per element, chooses the largest value of source and backdrop /// - /// Backgrop color + /// Backdrop color /// Source color /// Opacity applied to Source Alpha /// Output color @@ -121,7 +121,7 @@ namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders /// /// Overlays source over backdrop /// - /// Backgrop color + /// Backdrop color /// Source color /// Opacity applied to Source Alpha /// Output color @@ -139,7 +139,7 @@ namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders /// /// Hard light effect /// - /// Backgrop color + /// Backdrop color /// Source color /// Opacity applied to Source Alpha /// Output color @@ -169,7 +169,7 @@ namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders /// /// General composition function for all modes, with a general solution for alpha channel /// - /// Original backgrop color + /// Original Backdrop color /// Original source color /// Desired transformed color, without taking Alpha channel in account /// The final color diff --git a/tests/ImageSharp.Tests/PixelFormats/PixelBlenders/PorterDuffFunctionsTests.cs b/tests/ImageSharp.Tests/PixelFormats/PixelBlenders/PorterDuffFunctionsTests.cs index 9aa2e01a67..c5910e13a3 100644 --- a/tests/ImageSharp.Tests/PixelFormats/PixelBlenders/PorterDuffFunctionsTests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/PixelBlenders/PorterDuffFunctionsTests.cs @@ -79,7 +79,7 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelBlenders [MemberData(nameof(SubstractFunctionData))] public void SubstractFunction(TestVector4 back, TestVector4 source, float amount, TestVector4 expected) { - Vector4 actual = PorterDuffFunctions.Substract((Vector4)back, source, amount); + Vector4 actual = PorterDuffFunctions.Subtract((Vector4)back, source, amount); VectorAssert.Equal(expected, actual, 5); } diff --git a/tests/ImageSharp.Tests/PixelFormats/PixelBlenders/PorterDuffFunctionsTests_TPixel.cs b/tests/ImageSharp.Tests/PixelFormats/PixelBlenders/PorterDuffFunctionsTests_TPixel.cs index 50babde69a..d77c42086a 100644 --- a/tests/ImageSharp.Tests/PixelFormats/PixelBlenders/PorterDuffFunctionsTests_TPixel.cs +++ b/tests/ImageSharp.Tests/PixelFormats/PixelBlenders/PorterDuffFunctionsTests_TPixel.cs @@ -151,7 +151,7 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelBlenders public void SubstractFunction(TestPixel back, TestPixel source, float amount, TestPixel expected) where TPixel : struct, IPixel { - TPixel actual = PorterDuffFunctions.Substract((TPixel)back, source, amount); + TPixel actual = PorterDuffFunctions.Subtract((TPixel)back, source, amount); VectorAssert.Equal(expected, actual, 2); }