|
|
|
@ -30,7 +30,28 @@ namespace SixLabors.ImageSharp.Processing |
|
|
|
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
|
|
|
|
public static IImageProcessingContext BlackWhite(this IImageProcessingContext source, PixelShader pixelShader, Rectangle rectangle) |
|
|
|
public static IImageProcessingContext ApplyPixelShaderProcessor(this IImageProcessingContext source, PixelShader pixelShader, Rectangle rectangle) |
|
|
|
=> source.ApplyProcessor(new PixelShaderProcessor(pixelShader), rectangle); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Applies a user defined pixel shader to the image.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="pixelShader">The user defined pixel shader to use to modify images.</param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
|
|
|
|
public static IImageProcessingContext ApplyPixelShaderProcessor(this IImageProcessingContext source, PositionAwarePixelShader pixelShader) |
|
|
|
=> source.ApplyProcessor(new PositionAwarePixelShaderProcessor(pixelShader)); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Applies a user defined pixel shader to the image.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="pixelShader">The user defined pixel shader to use to modify images.</param>
|
|
|
|
/// <param name="rectangle">
|
|
|
|
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
|
|
|
|
public static IImageProcessingContext ApplyPixelShaderProcessor(this IImageProcessingContext source, PositionAwarePixelShader pixelShader, Rectangle rectangle) |
|
|
|
=> source.ApplyProcessor(new PositionAwarePixelShaderProcessor(pixelShader), rectangle); |
|
|
|
} |
|
|
|
} |
|
|
|
|