Browse Source

Fix spelling errors

pull/275/head
JimBobSquarePants 9 years ago
parent
commit
06271fa693
  1. 22
      src/ImageSharp/ApplyProcessors.cs
  2. 4
      src/ImageSharp/DefaultInternalImageProcessorContext.cs
  3. 9
      src/ImageSharp/Image/ICloningImageProcessor.cs
  4. 2
      src/ImageSharp/Processing/Processors/CloningImageProcessor.cs
  5. 2
      src/ImageSharp/Processing/Processors/Transforms/ResamplingWeightedProcessor.cs

22
src/ImageSharp/ApplyProcessors.cs

@ -17,19 +17,19 @@ namespace ImageSharp
public static partial class ImageExtensions public static partial class ImageExtensions
{ {
/// <summary> /// <summary>
/// Mutates the image by applying the operations to it. /// Mutates the image by applying the image operation to it.
/// </summary> /// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam> /// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image to rotate, flip, or both.</param> /// <param name="source">The image to rotate, flip, or both.</param>
/// <param name="operations">The operations to perform on the source.</param> /// <param name="operation">The operations to perform on the source.</param>
public static void Mutate<TPixel>(this Image<TPixel> source, Action<IImageProcessingContext<TPixel>> operations) public static void Mutate<TPixel>(this Image<TPixel> source, Action<IImageProcessingContext<TPixel>> operation)
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
{ {
Guard.NotNull(operations, nameof(operations)); Guard.NotNull(operation, nameof(operation));
Guard.NotNull(source, nameof(source)); Guard.NotNull(source, nameof(source));
IInternalImageProcessingContext<TPixel> operationsRunner = source.Configuration.ImageOperationsProvider.CreateImageProcessingContext(source, true); IInternalImageProcessingContext<TPixel> operationsRunner = source.Configuration.ImageOperationsProvider.CreateImageProcessingContext(source, true);
operations(operationsRunner); operation(operationsRunner);
operationsRunner.Apply(); operationsRunner.Apply();
} }
@ -51,20 +51,20 @@ namespace ImageSharp
} }
/// <summary> /// <summary>
/// Clones the current image mutating the clone by applying the operations to it. /// Clones the current image mutating the clone by applying the operation to it.
/// </summary> /// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam> /// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image to rotate, flip, or both.</param> /// <param name="source">The image to rotate, flip, or both.</param>
/// <param name="operations">The operations to perform on the source.</param> /// <param name="operation">The operations to perform on the source.</param>
/// <returns>Anew Image which has teh data from the <paramref name="source"/> but with the <paramref name="operations"/> applied.</returns> /// <returns>Anew Image which has teh data from the <paramref name="source"/> but with the <paramref name="operation"/> applied.</returns>
public static Image<TPixel> Clone<TPixel>(this Image<TPixel> source, Action<IImageProcessingContext<TPixel>> operations) public static Image<TPixel> Clone<TPixel>(this Image<TPixel> source, Action<IImageProcessingContext<TPixel>> operation)
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
{ {
Guard.NotNull(operations, nameof(operations)); Guard.NotNull(operation, nameof(operation));
Guard.NotNull(source, nameof(source)); Guard.NotNull(source, nameof(source));
IInternalImageProcessingContext<TPixel> operationsRunner = source.Configuration.ImageOperationsProvider.CreateImageProcessingContext(source, false); IInternalImageProcessingContext<TPixel> operationsRunner = source.Configuration.ImageOperationsProvider.CreateImageProcessingContext(source, false);
operations(operationsRunner); operation(operationsRunner);
return operationsRunner.Apply(); return operationsRunner.Apply();
} }

4
src/ImageSharp/DefaultInternalImageProcessorContext.cs

@ -57,9 +57,9 @@ namespace ImageSharp
// this will only work if the first processor applied is the cloning one thus // this will only work if the first processor applied is the cloning one thus
// realistically for this optermissation to work the resize must the first processor // realistically for this optermissation to work the resize must the first processor
// applied any only up processors will take the douple data path. // applied any only up processors will take the douple data path.
if (processor is ICloneingImageProcessor<TPixel>) if (processor is ICloningImageProcessor<TPixel>)
{ {
var cloningProcessor = (ICloneingImageProcessor<TPixel>)processor; var cloningProcessor = (ICloningImageProcessor<TPixel>)processor;
this.destination = cloningProcessor.CloneAndApply(this.source, rectangle); this.destination = cloningProcessor.CloneAndApply(this.source, rectangle);
return this; return this;
} }

9
src/ImageSharp/Image/ICloneingImageProcessor.cs → src/ImageSharp/Image/ICloningImageProcessor.cs

@ -1,21 +1,18 @@
// <copyright file="ICloneingImageProcessor.cs" company="James Jackson-South"> // <copyright file="ICloningImageProcessor.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors. // Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
// </copyright> // </copyright>
namespace ImageSharp.Processing namespace ImageSharp.Processing
{ {
using System;
using System.Threading.Tasks;
using ImageSharp.PixelFormats; using ImageSharp.PixelFormats;
using SixLabors.Primitives; using SixLabors.Primitives;
/// <summary> /// <summary>
/// Encapsulates methods to alter the pixels of an image. /// Encapsulates methods to alter the pixels of a new image, cloned from the original image.
/// </summary> /// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam> /// <typeparam name="TPixel">The pixel format.</typeparam>
internal interface ICloneingImageProcessor<TPixel> : IImageProcessor<TPixel> internal interface ICloningImageProcessor<TPixel> : IImageProcessor<TPixel>
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
{ {
/// <summary> /// <summary>

2
src/ImageSharp/Processing/Processors/CLoneingImageProcessor.cs → src/ImageSharp/Processing/Processors/CloningImageProcessor.cs

@ -15,7 +15,7 @@ namespace ImageSharp.Processing
/// Allows the application of processors to images. /// Allows the application of processors to images.
/// </summary> /// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam> /// <typeparam name="TPixel">The pixel format.</typeparam>
internal abstract class CloneingImageProcessor<TPixel> : IImageProcessor<TPixel>, ICloneingImageProcessor<TPixel> internal abstract class CloningImageProcessor<TPixel> : IImageProcessor<TPixel>, ICloningImageProcessor<TPixel>
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
{ {
/// <inheritdoc/> /// <inheritdoc/>

2
src/ImageSharp/Processing/Processors/Transforms/ResamplingWeightedProcessor.cs

@ -16,7 +16,7 @@ namespace ImageSharp.Processing.Processors
/// Adapted from <see href="http://www.realtimerendering.com/resources/GraphicsGems/gemsiii/filter_rcg.c"/> /// Adapted from <see href="http://www.realtimerendering.com/resources/GraphicsGems/gemsiii/filter_rcg.c"/>
/// </summary> /// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam> /// <typeparam name="TPixel">The pixel format.</typeparam>
internal abstract partial class ResamplingWeightedProcessor<TPixel> : CloneingImageProcessor<TPixel> internal abstract partial class ResamplingWeightedProcessor<TPixel> : CloningImageProcessor<TPixel>
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
{ {
/// <summary> /// <summary>

Loading…
Cancel
Save