Browse Source

Rename types

af/merge-core
James Jackson-South 8 years ago
parent
commit
dccdc1d181
  1. 2
      src/ImageSharp/Processing/Dithering/DitherExtensions.cs
  2. 2
      src/ImageSharp/Processing/Dithering/KnownDitherers.cs
  3. 2
      src/ImageSharp/Processing/Filters/KnownFilterMatrices.cs
  4. 2
      src/ImageSharp/Processing/Filters/Processors/AchromatomalyProcessor.cs
  5. 2
      src/ImageSharp/Processing/Filters/Processors/AchromatopsiaProcessor.cs
  6. 2
      src/ImageSharp/Processing/Filters/Processors/BlackWhiteProcessor.cs
  7. 2
      src/ImageSharp/Processing/Filters/Processors/BrightnessProcessor.cs
  8. 2
      src/ImageSharp/Processing/Filters/Processors/ContrastProcessor.cs
  9. 2
      src/ImageSharp/Processing/Filters/Processors/DeuteranomalyProcessor.cs
  10. 2
      src/ImageSharp/Processing/Filters/Processors/DeuteranopiaProcessor.cs
  11. 2
      src/ImageSharp/Processing/Filters/Processors/GrayscaleBt601Processor.cs
  12. 2
      src/ImageSharp/Processing/Filters/Processors/GrayscaleBt709Processor.cs
  13. 2
      src/ImageSharp/Processing/Filters/Processors/HueProcessor.cs
  14. 2
      src/ImageSharp/Processing/Filters/Processors/InvertProcessor.cs
  15. 2
      src/ImageSharp/Processing/Filters/Processors/KodachromeProcessor.cs
  16. 2
      src/ImageSharp/Processing/Filters/Processors/LomographProcessor.cs
  17. 2
      src/ImageSharp/Processing/Filters/Processors/OpacityProcessor.cs
  18. 2
      src/ImageSharp/Processing/Filters/Processors/PolaroidProcessor.cs
  19. 2
      src/ImageSharp/Processing/Filters/Processors/ProtanomalyProcessor.cs
  20. 2
      src/ImageSharp/Processing/Filters/Processors/ProtanopiaProcessor.cs
  21. 2
      src/ImageSharp/Processing/Filters/Processors/SaturateProcessor.cs
  22. 2
      src/ImageSharp/Processing/Filters/Processors/SepiaProcessor.cs
  23. 2
      src/ImageSharp/Processing/Filters/Processors/TritanomalyProcessor.cs
  24. 2
      src/ImageSharp/Processing/Filters/Processors/TritanopiaProcessor.cs
  25. 2
      tests/ImageSharp.Tests/Processing/Binarization/BinaryDitherTest.cs
  26. 2
      tests/ImageSharp.Tests/Processing/Dithering/DitherTest.cs
  27. 4
      tests/ImageSharp.Tests/Processing/Filters/FilterTest.cs
  28. 10
      tests/ImageSharp.Tests/Processing/Processors/Binarization/BinaryDitherTests.cs
  29. 10
      tests/ImageSharp.Tests/Processing/Processors/Dithering/DitherTests.cs
  30. 6
      tests/ImageSharp.Tests/Processing/Processors/Filters/FilterTest.cs

2
src/ImageSharp/Processing/Dithering/DitherExtensions.cs

@ -21,7 +21,7 @@ namespace SixLabors.ImageSharp.Processing.Dithering
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
public static IImageProcessingContext<TPixel> Dither<TPixel>(this IImageProcessingContext<TPixel> source)
where TPixel : struct, IPixel<TPixel>
=> Dither(source, KnownDitherMatrices.BayerDither4x4);
=> Dither(source, KnownDitherers.BayerDither4x4);
/// <summary>
/// Dithers the image reducing it to a web-safe palette using ordered dithering.

2
src/ImageSharp/Processing/Dithering/KnownDitherMatrices.cs → src/ImageSharp/Processing/Dithering/KnownDitherers.cs

@ -8,7 +8,7 @@ namespace SixLabors.ImageSharp.Processing.Dithering
/// <summary>
/// Contains reusable static instances of known ordered dither matrices
/// </summary>
public class KnownDitherMatrices
public class KnownDitherers
{
/// <summary>
/// Gets the order ditherer using the 2x2 Bayer dithering matrix

2
src/ImageSharp/Processing/Filters/KnownMatrixFilters.cs → src/ImageSharp/Processing/Filters/KnownFilterMatrices.cs

@ -9,7 +9,7 @@ namespace SixLabors.ImageSharp.Processing.Filters
/// <summary>
/// A collection of known <see cref="Matrix4x4"/> values for composing filters
/// </summary>
public static class KnownMatrixFilters
public static class KnownFilterMatrices
{
/// <summary>
/// Gets a filter recreating Achromatomaly (Color desensitivity) color blindness

2
src/ImageSharp/Processing/Filters/Processors/AchromatomalyProcessor.cs

@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// Initializes a new instance of the <see cref="AchromatomalyProcessor{TPixel}"/> class.
/// </summary>
public AchromatomalyProcessor()
: base(KnownMatrixFilters.AchromatomalyFilter)
: base(KnownFilterMatrices.AchromatomalyFilter)
{
}
}

2
src/ImageSharp/Processing/Filters/Processors/AchromatopsiaProcessor.cs

@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// Initializes a new instance of the <see cref="AchromatopsiaProcessor{TPixel}"/> class.
/// </summary>
public AchromatopsiaProcessor()
: base(KnownMatrixFilters.AchromatopsiaFilter)
: base(KnownFilterMatrices.AchromatopsiaFilter)
{
}
}

2
src/ImageSharp/Processing/Filters/Processors/BlackWhiteProcessor.cs

@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// Initializes a new instance of the <see cref="BlackWhiteProcessor{TPixel}"/> class.
/// </summary>
public BlackWhiteProcessor()
: base(KnownMatrixFilters.BlackWhiteFilter)
: base(KnownFilterMatrices.BlackWhiteFilter)
{
}
}

2
src/ImageSharp/Processing/Filters/Processors/BrightnessProcessor.cs

@ -21,7 +21,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// </remarks>
/// <param name="amount">The proportion of the conversion. Must be greater than or equal to 0.</param>
public BrightnessProcessor(float amount)
: base(KnownMatrixFilters.CreateBrightnessFilter(amount))
: base(KnownFilterMatrices.CreateBrightnessFilter(amount))
{
this.Amount = amount;
}

2
src/ImageSharp/Processing/Filters/Processors/ContrastProcessor.cs

@ -21,7 +21,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// </remarks>
/// <param name="amount">The proportion of the conversion. Must be greater than or equal to 0.</param>
public ContrastProcessor(float amount)
: base(KnownMatrixFilters.CreateContrastFilter(amount))
: base(KnownFilterMatrices.CreateContrastFilter(amount))
{
this.Amount = amount;
}

2
src/ImageSharp/Processing/Filters/Processors/DeuteranomalyProcessor.cs

@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// Initializes a new instance of the <see cref="DeuteranomalyProcessor{TPixel}"/> class.
/// </summary>
public DeuteranomalyProcessor()
: base(KnownMatrixFilters.DeuteranomalyFilter)
: base(KnownFilterMatrices.DeuteranomalyFilter)
{
}
}

2
src/ImageSharp/Processing/Filters/Processors/DeuteranopiaProcessor.cs

@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// Initializes a new instance of the <see cref="DeuteranopiaProcessor{TPixel}"/> class.
/// </summary>
public DeuteranopiaProcessor()
: base(KnownMatrixFilters.DeuteranopiaFilter)
: base(KnownFilterMatrices.DeuteranopiaFilter)
{
}
}

2
src/ImageSharp/Processing/Filters/Processors/GrayscaleBt601Processor.cs

@ -17,7 +17,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// </summary>
/// <param name="amount">The proportion of the conversion. Must be between 0 and 1.</param>
public GrayscaleBt601Processor(float amount)
: base(KnownMatrixFilters.CreateGrayscaleBt601Filter(amount))
: base(KnownFilterMatrices.CreateGrayscaleBt601Filter(amount))
{
this.Amount = amount;
}

2
src/ImageSharp/Processing/Filters/Processors/GrayscaleBt709Processor.cs

@ -17,7 +17,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// </summary>
/// <param name="amount">The proportion of the conversion. Must be between 0 and 1.</param>
public GrayscaleBt709Processor(float amount)
: base(KnownMatrixFilters.CreateGrayscaleBt709Filter(amount))
: base(KnownFilterMatrices.CreateGrayscaleBt709Filter(amount))
{
this.Amount = amount;
}

2
src/ImageSharp/Processing/Filters/Processors/HueProcessor.cs

@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// </summary>
/// <param name="degrees">The angle of rotation in degrees</param>
public HueProcessor(float degrees)
: base(KnownMatrixFilters.CreateHueFilter(degrees))
: base(KnownFilterMatrices.CreateHueFilter(degrees))
{
this.Degrees = degrees;
}

2
src/ImageSharp/Processing/Filters/Processors/InvertProcessor.cs

@ -17,7 +17,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// </summary>
/// <param name="amount">The proportion of the conversion. Must be between 0 and 1.</param>
public InvertProcessor(float amount)
: base(KnownMatrixFilters.CreateInvertFilter(amount))
: base(KnownFilterMatrices.CreateInvertFilter(amount))
{
this.Amount = amount;
}

2
src/ImageSharp/Processing/Filters/Processors/KodachromeProcessor.cs

@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// Initializes a new instance of the <see cref="KodachromeProcessor{TPixel}"/> class.
/// </summary>
public KodachromeProcessor()
: base(KnownMatrixFilters.KodachromeFilter)
: base(KnownFilterMatrices.KodachromeFilter)
{
}
}

2
src/ImageSharp/Processing/Filters/Processors/LomographProcessor.cs

@ -20,7 +20,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// Initializes a new instance of the <see cref="LomographProcessor{TPixel}" /> class.
/// </summary>
public LomographProcessor()
: base(KnownMatrixFilters.LomographFilter)
: base(KnownFilterMatrices.LomographFilter)
{
}

2
src/ImageSharp/Processing/Filters/Processors/OpacityProcessor.cs

@ -17,7 +17,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// </summary>
/// <param name="amount">The proportion of the conversion. Must be between 0 and 1.</param>
public OpacityProcessor(float amount)
: base(KnownMatrixFilters.CreateOpacityFilter(amount))
: base(KnownFilterMatrices.CreateOpacityFilter(amount))
{
this.Amount = amount;
}

2
src/ImageSharp/Processing/Filters/Processors/PolaroidProcessor.cs

@ -21,7 +21,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// Initializes a new instance of the <see cref="PolaroidProcessor{TPixel}" /> class.
/// </summary>
public PolaroidProcessor()
: base(KnownMatrixFilters.PolaroidFilter)
: base(KnownFilterMatrices.PolaroidFilter)
{
}

2
src/ImageSharp/Processing/Filters/Processors/ProtanomalyProcessor.cs

@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// Initializes a new instance of the <see cref="ProtanomalyProcessor{TPixel}"/> class.
/// </summary>
public ProtanomalyProcessor()
: base(KnownMatrixFilters.ProtanomalyFilter)
: base(KnownFilterMatrices.ProtanomalyFilter)
{
}
}

2
src/ImageSharp/Processing/Filters/Processors/ProtanopiaProcessor.cs

@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// Initializes a new instance of the <see cref="ProtanopiaProcessor{TPixel}"/> class.
/// </summary>
public ProtanopiaProcessor()
: base(KnownMatrixFilters.ProtanopiaFilter)
: base(KnownFilterMatrices.ProtanopiaFilter)
{
}
}

2
src/ImageSharp/Processing/Filters/Processors/SaturateProcessor.cs

@ -21,7 +21,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// </remarks>
/// <param name="amount">The proportion of the conversion. Must be greater than or equal to 0.</param>
public SaturateProcessor(float amount)
: base(KnownMatrixFilters.CreateSaturateFilter(amount))
: base(KnownFilterMatrices.CreateSaturateFilter(amount))
{
this.Amount = amount;
}

2
src/ImageSharp/Processing/Filters/Processors/SepiaProcessor.cs

@ -17,7 +17,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// </summary>
/// <param name="amount">The proportion of the conversion. Must be between 0 and 1.</param>
public SepiaProcessor(float amount)
: base(KnownMatrixFilters.CreateSepiaFilter(amount))
: base(KnownFilterMatrices.CreateSepiaFilter(amount))
{
this.Amount = amount;
}

2
src/ImageSharp/Processing/Filters/Processors/TritanomalyProcessor.cs

@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// Initializes a new instance of the <see cref="TritanomalyProcessor{TPixel}"/> class.
/// </summary>
public TritanomalyProcessor()
: base(KnownMatrixFilters.TritanomalyFilter)
: base(KnownFilterMatrices.TritanomalyFilter)
{
}
}

2
src/ImageSharp/Processing/Filters/Processors/TritanopiaProcessor.cs

@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Processing.Filters.Processors
/// Initializes a new instance of the <see cref="TritanopiaProcessor{TPixel}"/> class.
/// </summary>
public TritanopiaProcessor()
: base(KnownMatrixFilters.TritanopiaFilter)
: base(KnownFilterMatrices.TritanopiaFilter)
{
}
}

2
tests/ImageSharp.Tests/Processing/Binarization/BinaryDitherTest.cs

@ -20,7 +20,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Binarization
public BinaryDitherTest()
{
this.orderedDither = KnownDitherMatrices.BayerDither4x4;
this.orderedDither = KnownDitherers.BayerDither4x4;
this.errorDiffuser = KnownDiffusers.FloydSteinberg;
}

2
tests/ImageSharp.Tests/Processing/Dithering/DitherTest.cs

@ -25,7 +25,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Binarization
public DitherTest()
{
this.orderedDither = KnownDitherMatrices.BayerDither4x4;
this.orderedDither = KnownDitherers.BayerDither4x4;
this.errorDiffuser = KnownDiffusers.FloydSteinberg;
}

4
tests/ImageSharp.Tests/Processing/Filters/FilterTest.cs

@ -16,14 +16,14 @@ namespace SixLabors.ImageSharp.Tests.Processing.Filters
[Fact]
public void Filter_CorrectProcessor()
{
this.operations.Filter(KnownMatrixFilters.AchromatomalyFilter * KnownMatrixFilters.CreateHueFilter(90F));
this.operations.Filter(KnownFilterMatrices.AchromatomalyFilter * KnownFilterMatrices.CreateHueFilter(90F));
FilterProcessor<Rgba32> p = this.Verify<FilterProcessor<Rgba32>>();
}
[Fact]
public void Filter_rect_CorrectProcessor()
{
this.operations.Filter(KnownMatrixFilters.AchromatomalyFilter * KnownMatrixFilters.CreateHueFilter(90F), this.rect);
this.operations.Filter(KnownFilterMatrices.AchromatomalyFilter * KnownFilterMatrices.CreateHueFilter(90F), this.rect);
FilterProcessor<Rgba32> p = this.Verify<FilterProcessor<Rgba32>>(this.rect);
}
}

10
tests/ImageSharp.Tests/Processing/Processors/Binarization/BinaryDitherTests.cs

@ -25,10 +25,10 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Binarization
public static readonly TheoryData<string, IOrderedDither> OrderedDitherers = new TheoryData<string, IOrderedDither>
{
{ "Bayer8x8", KnownDitherMatrices.BayerDither8x8 },
{ "Bayer4x4", KnownDitherMatrices.BayerDither4x4 },
{ "Ordered3x3", KnownDitherMatrices.OrderedDither3x3 },
{ "Bayer2x2", KnownDitherMatrices.BayerDither2x2 }
{ "Bayer8x8", KnownDitherers.BayerDither8x8 },
{ "Bayer4x4", KnownDitherers.BayerDither4x4 },
{ "Ordered3x3", KnownDitherers.OrderedDither3x3 },
{ "Bayer2x2", KnownDitherers.BayerDither2x2 }
};
public static readonly TheoryData<string, IErrorDiffuser> ErrorDiffusers = new TheoryData<string, IErrorDiffuser>
@ -45,7 +45,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Binarization
};
private static IOrderedDither DefaultDitherer => KnownDitherMatrices.BayerDither4x4;
private static IOrderedDither DefaultDitherer => KnownDitherers.BayerDither4x4;
private static IErrorDiffuser DefaultErrorDiffuser => KnownDiffusers.Atkinson;

10
tests/ImageSharp.Tests/Processing/Processors/Dithering/DitherTests.cs

@ -24,10 +24,10 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Binarization
public static readonly TheoryData<string, IOrderedDither> OrderedDitherers = new TheoryData<string, IOrderedDither>
{
{ "Bayer8x8", KnownDitherMatrices.BayerDither8x8 },
{ "Bayer4x4", KnownDitherMatrices.BayerDither4x4 },
{ "Ordered3x3", KnownDitherMatrices.OrderedDither3x3 },
{ "Bayer2x2", KnownDitherMatrices.BayerDither2x2 }
{ "Bayer8x8", KnownDitherers.BayerDither8x8 },
{ "Bayer4x4", KnownDitherers.BayerDither4x4 },
{ "Ordered3x3", KnownDitherers.OrderedDither3x3 },
{ "Bayer2x2", KnownDitherers.BayerDither2x2 }
};
public static readonly TheoryData<string, IErrorDiffuser> ErrorDiffusers = new TheoryData<string, IErrorDiffuser>
@ -44,7 +44,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Binarization
};
private static IOrderedDither DefaultDitherer => KnownDitherMatrices.BayerDither4x4;
private static IOrderedDither DefaultDitherer => KnownDitherers.BayerDither4x4;
private static IErrorDiffuser DefaultErrorDiffuser => KnownDiffusers.Atkinson;

6
tests/ImageSharp.Tests/Processing/Processors/Filters/FilterTest.cs

@ -40,9 +40,9 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Filters
private static Matrix4x4 CreateCombinedTestFilterMatrix()
{
Matrix4x4 brightness = KnownMatrixFilters.CreateBrightnessFilter(0.9F);
Matrix4x4 hue = KnownMatrixFilters.CreateHueFilter(180F);
Matrix4x4 saturation = KnownMatrixFilters.CreateSaturateFilter(1.5F);
Matrix4x4 brightness = KnownFilterMatrices.CreateBrightnessFilter(0.9F);
Matrix4x4 hue = KnownFilterMatrices.CreateHueFilter(180F);
Matrix4x4 saturation = KnownFilterMatrices.CreateSaturateFilter(1.5F);
Matrix4x4 m = brightness * hue * saturation;
return m;
}

Loading…
Cancel
Save