Browse Source

Intellisense docs cleanup

pull/275/head
JimBobSquarePants 9 years ago
parent
commit
9c5798bb4b
  1. 32
      src/ImageSharp/ApplyProcessors.cs
  2. 12
      src/ImageSharp/Configuration.cs
  3. 2
      src/ImageSharp/DefaultInternalImageProcessorContext.cs
  4. 8
      src/ImageSharp/IImageProcessingContextFactory.cs
  5. 2
      src/ImageSharp/IImageProcessingContext{TPixel}.cs
  6. 8
      src/ImageSharp/Processing/Delegate.cs
  7. 2
      src/ImageSharp/Processing/Processors/CloningImageProcessor.cs

32
src/ImageSharp/ApplyProcessors.cs

@ -17,11 +17,11 @@ namespace ImageSharp
public static partial class ImageExtensions public static partial class ImageExtensions
{ {
/// <summary> /// <summary>
/// Mutates the image by applying the image operation to it. /// Mutates the source 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 mutate.</param>
/// <param name="operation">The operations to perform on the source.</param> /// <param name="operation">The operation to perform on the source.</param>
public static void Mutate<TPixel>(this Image<TPixel> source, Action<IImageProcessingContext<TPixel>> operation) public static void Mutate<TPixel>(this Image<TPixel> source, Action<IImageProcessingContext<TPixel>> operation)
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
{ {
@ -34,10 +34,10 @@ namespace ImageSharp
} }
/// <summary> /// <summary>
/// Mutates the image by applying the operations to it. /// Mutates the source image by applying the operations 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 mutate.</param>
/// <param name="operations">The operations to perform on the source.</param> /// <param name="operations">The operations to perform on the source.</param>
public static void Mutate<TPixel>(this Image<TPixel> source, params IImageProcessor<TPixel>[] operations) public static void Mutate<TPixel>(this Image<TPixel> source, params IImageProcessor<TPixel>[] operations)
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
@ -51,12 +51,12 @@ namespace ImageSharp
} }
/// <summary> /// <summary>
/// Clones the current image mutating the clone by applying the operation to it. /// Creates a deep clone of the current image. The clone is then mutated by the given operation.
/// </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 clone.</param>
/// <param name="operation">The operations to perform on the source.</param> /// <param name="operation">The operation to perform on the clone.</param>
/// <returns>Anew Image which has teh data from the <paramref name="source"/> but with the <paramref name="operation"/> applied.</returns> /// <returns>The new <see cref="Image{TPixel}"/></returns>
public static Image<TPixel> Clone<TPixel>(this Image<TPixel> source, Action<IImageProcessingContext<TPixel>> operation) public static Image<TPixel> Clone<TPixel>(this Image<TPixel> source, Action<IImageProcessingContext<TPixel>> operation)
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
{ {
@ -69,12 +69,12 @@ namespace ImageSharp
} }
/// <summary> /// <summary>
/// Clones the current image mutating the clone by applying the operations to it. /// Creates a deep clone of the current image. The clone is then mutated by the given operations.
/// </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 clone.</param>
/// <param name="operations">The operations to perform on the source.</param> /// <param name="operations">The operations to perform on the clone.</param>
/// <returns>Anew Image which has teh data from the <paramref name="source"/> but with the <paramref name="operations"/> applied.</returns> /// <returns>The new <see cref="Image{TPixel}"/></returns>
public static Image<TPixel> Clone<TPixel>(this Image<TPixel> source, params IImageProcessor<TPixel>[] operations) public static Image<TPixel> Clone<TPixel>(this Image<TPixel> source, params IImageProcessor<TPixel>[] operations)
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
{ {
@ -87,12 +87,12 @@ namespace ImageSharp
} }
/// <summary> /// <summary>
/// Applies all the ImageProcessors agains the operation /// Applies the given <see cref="IImageProcessor{TPixel}"/> collection against the context
/// </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 processing context.</param>
/// <param name="operations">The operations to perform on the source.</param> /// <param name="operations">The operations to perform on the source.</param>
/// <returns>returns the current operations class to allow chaining of operations.</returns> /// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> ApplyProcessors<TPixel>(this IImageProcessingContext<TPixel> source, params IImageProcessor<TPixel>[] operations) public static IImageProcessingContext<TPixel> ApplyProcessors<TPixel>(this IImageProcessingContext<TPixel> source, params IImageProcessor<TPixel>[] operations)
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
{ {

12
src/ImageSharp/Configuration.cs

@ -109,9 +109,9 @@ namespace ImageSharp
#endif #endif
/// <summary> /// <summary>
/// Gets or sets the image operations providers. /// Gets or sets the image operations provider factory.
/// </summary> /// </summary>
internal IImageProcessingContextFactory ImageOperationsProvider { get; set; } = new DefaultImageOperationsProvider(); internal IImageProcessingContextFactory ImageOperationsProvider { get; set; } = new DefaultImageOperationsProviderFactory();
/// <summary> /// <summary>
/// Registers a new format provider. /// Registers a new format provider.
@ -126,7 +126,7 @@ namespace ImageSharp
/// <summary> /// <summary>
/// Registers a new format provider. /// Registers a new format provider.
/// </summary> /// </summary>
/// <param name="format">The format to register as a well know format.</param> /// <param name="format">The format to register as a known format.</param>
public void AddImageFormat(IImageFormat format) public void AddImageFormat(IImageFormat format)
{ {
Guard.NotNull(format, nameof(format)); Guard.NotNull(format, nameof(format));
@ -136,10 +136,10 @@ namespace ImageSharp
} }
/// <summary> /// <summary>
/// For the specified file extensions type find the e <see cref="IImageFormat"/>. /// For the specified file extensions type find the <see cref="IImageFormat"/>.
/// </summary> /// </summary>
/// <param name="extension">The extension to discover</param> /// <param name="extension">The extension to discover</param>
/// <returns>The <see cref="IImageFormat"/> if found otherwise null</returns> /// <returns>The <see cref="IImageFormat"/> if found; otherwise null</returns>
public IImageFormat FindFormatByFileExtensions(string extension) public IImageFormat FindFormatByFileExtensions(string extension)
{ {
return this.imageFormats.FirstOrDefault(x => x.FileExtensions.Contains(extension, StringComparer.OrdinalIgnoreCase)); return this.imageFormats.FirstOrDefault(x => x.FileExtensions.Contains(extension, StringComparer.OrdinalIgnoreCase));
@ -149,7 +149,7 @@ namespace ImageSharp
/// For the specified mime type find the <see cref="IImageFormat"/>. /// For the specified mime type find the <see cref="IImageFormat"/>.
/// </summary> /// </summary>
/// <param name="mimeType">The mime-type to discover</param> /// <param name="mimeType">The mime-type to discover</param>
/// <returns>The <see cref="IImageFormat"/> if found otherwise null</returns> /// <returns>The <see cref="IImageFormat"/> if found; otherwise null</returns>
public IImageFormat FindFormatByMimeType(string mimeType) public IImageFormat FindFormatByMimeType(string mimeType)
{ {
return this.imageFormats.FirstOrDefault(x => x.MimeTypes.Contains(mimeType, StringComparer.OrdinalIgnoreCase)); return this.imageFormats.FirstOrDefault(x => x.MimeTypes.Contains(mimeType, StringComparer.OrdinalIgnoreCase));

2
src/ImageSharp/DefaultInternalImageProcessorContext.cs

@ -40,7 +40,7 @@ namespace ImageSharp
{ {
if (!this.mutate && this.destination == null) if (!this.mutate && this.destination == null)
{ {
// Ensure we have cloned it if we are not mutating as we might have failed to register any Processors // Ensure we have cloned it if we are not mutating as we might have failed to register any processors
this.destination = this.source.Clone(); this.destination = this.source.Clone();
} }

8
src/ImageSharp/IImageProcessingContextFactory.cs

@ -13,20 +13,20 @@ namespace ImageSharp
internal interface IImageProcessingContextFactory internal interface IImageProcessingContextFactory
{ {
/// <summary> /// <summary>
/// Called during Mutate operations to generate the image operations provider. /// Called during mutate operations to generate the image operations provider.
/// </summary> /// </summary>
/// <typeparam name="TPixel">The pixel format</typeparam> /// <typeparam name="TPixel">The pixel format</typeparam>
/// <param name="source">The source image.</param> /// <param name="source">The source image.</param>
/// <param name="mutate">A flag to determin with the image operations is allowed to mutate the source image or not.</param> /// <param name="mutate">A flag to determine whether image operations are allowed to mutate the source image.</param>
/// <returns>A new IImageOPeration</returns> /// <returns>A new IImageOPeration</returns>
IInternalImageProcessingContext<TPixel> CreateImageProcessingContext<TPixel>(Image<TPixel> source, bool mutate) IInternalImageProcessingContext<TPixel> CreateImageProcessingContext<TPixel>(Image<TPixel> source, bool mutate)
where TPixel : struct, IPixel<TPixel>; where TPixel : struct, IPixel<TPixel>;
} }
/// <summary> /// <summary>
/// The default implmentation of IImageOperationsProvider /// The default implmentation of <see cref="IImageProcessingContextFactory"/>
/// </summary> /// </summary>
internal class DefaultImageOperationsProvider : IImageProcessingContextFactory internal class DefaultImageOperationsProviderFactory : IImageProcessingContextFactory
{ {
/// <inheritdoc/> /// <inheritdoc/>
public IInternalImageProcessingContext<TPixel> CreateImageProcessingContext<TPixel>(Image<TPixel> source, bool mutate) public IInternalImageProcessingContext<TPixel> CreateImageProcessingContext<TPixel>(Image<TPixel> source, bool mutate)

2
src/ImageSharp/IImageProcessingContext{TPixel}.cs

@ -10,7 +10,7 @@ namespace ImageSharp
using SixLabors.Primitives; using SixLabors.Primitives;
/// <summary> /// <summary>
/// An interface to queue up image operations. /// An interface to queue up image operations to apply to an image.
/// </summary> /// </summary>
/// <typeparam name="TPixel">The pixel format</typeparam> /// <typeparam name="TPixel">The pixel format</typeparam>
public interface IImageProcessingContext<TPixel> public interface IImageProcessingContext<TPixel>

8
src/ImageSharp/Processing/Delegate.cs

@ -17,12 +17,12 @@ namespace ImageSharp
public static partial class ImageExtensions public static partial class ImageExtensions
{ {
/// <summary> /// <summary>
/// Queues up an operation that provides access to the mutatable image. /// Applies the given operation to the mutable image.
/// </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 mutate.</param>
/// <param name="operation">The operations to perform on the source.</param> /// <param name="operation">The operation to perform on the source.</param>
/// <returns>returns the current operations class to allow chaining of operations.</returns> /// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Apply<TPixel>(this IImageProcessingContext<TPixel> source, Action<Image<TPixel>> operation) public static IImageProcessingContext<TPixel> Apply<TPixel>(this IImageProcessingContext<TPixel> source, Action<Image<TPixel>> operation)
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new DelegateProcessor<TPixel>(operation)); => source.ApplyProcessor(new DelegateProcessor<TPixel>(operation));

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

@ -94,7 +94,7 @@ namespace ImageSharp.Processing
} }
/// <summary> /// <summary>
/// Generates the clone of the source image that operatinos should be applied to. /// Generates a deep clone of the source image that operatinos should be applied to.
/// </summary> /// </summary>
/// <param name="source">The source image. Cannot be null.</param> /// <param name="source">The source image. Cannot be null.</param>
/// <param name="sourceRectangle">The source rectangle.</param> /// <param name="sourceRectangle">The source rectangle.</param>

Loading…
Cancel
Save