|
|
|
@ -12,12 +12,12 @@ namespace SixLabors.ImageSharp.Processing; |
|
|
|
public static class DrawImageExtensions |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the current one by blending their pixels.
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="image">The image to blend with the currently processing image.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to blend. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixelDst}"/>.</returns>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="image">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to draw. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image image, |
|
|
|
@ -28,13 +28,13 @@ public static class DrawImageExtensions |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the current one by blending their pixels.
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="image">The image to blend with the currently processing image.</param>
|
|
|
|
/// <param name="rectangle">The <see cref="Rectangle"/> structure that specifies the portion of the image to draw.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to blend. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixelDst}"/>.</returns>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="image">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="rectangle">The rectangle structure that specifies the portion of the image to draw.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to draw. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image image, |
|
|
|
@ -46,13 +46,13 @@ public static class DrawImageExtensions |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the current one by blending their pixels.
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="image">The image to blend with the currently processing image.</param>
|
|
|
|
/// <param name="colorBlending">The blending mode.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to blend. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixelDst}"/>.</returns>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="image">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="colorBlending">The color blending mode.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to draw. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image image, |
|
|
|
@ -61,14 +61,14 @@ public static class DrawImageExtensions |
|
|
|
=> DrawImage(source, image, Point.Empty, colorBlending, opacity); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the current one by blending their pixels.
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="image">The image to blend with the currently processing image.</param>
|
|
|
|
/// <param name="rectangle">The <see cref="Rectangle"/> structure that specifies the portion of the image to draw.</param>
|
|
|
|
/// <param name="colorBlending">The blending mode.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to blend. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixelDst}"/>.</returns>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="image">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="rectangle">The rectangle structure that specifies the portion of the image to draw.</param>
|
|
|
|
/// <param name="colorBlending">The color blending mode.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to draw. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image image, |
|
|
|
@ -78,14 +78,14 @@ public static class DrawImageExtensions |
|
|
|
=> DrawImage(source, image, rectangle, colorBlending, source.GetGraphicsOptions().AlphaCompositionMode, opacity); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the current one by blending their pixels.
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="image">The image to blend with the currently processing image.</param>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="image">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="colorBlending">The color blending mode.</param>
|
|
|
|
/// <param name="alphaComposition">The alpha composition mode.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to blend. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixelDst}"/>.</returns>
|
|
|
|
/// <param name="opacity">The opacity of the image to draw. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image image, |
|
|
|
@ -95,15 +95,15 @@ public static class DrawImageExtensions |
|
|
|
=> DrawImage(source, image, Point.Empty, colorBlending, alphaComposition, opacity); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the current one by blending their pixels.
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="image">The image to blend with the currently processing image.</param>
|
|
|
|
/// <param name="rectangle">The <see cref="Rectangle"/> structure that specifies the portion of the image to draw.</param>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="image">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="rectangle">The rectangle structure that specifies the portion of the image to draw.</param>
|
|
|
|
/// <param name="colorBlending">The color blending mode.</param>
|
|
|
|
/// <param name="alphaComposition">The alpha composition mode.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to blend. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixelDst}"/>.</returns>
|
|
|
|
/// <param name="opacity">The opacity of the image to draw. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image image, |
|
|
|
@ -114,12 +114,12 @@ public static class DrawImageExtensions |
|
|
|
=> DrawImage(source, image, Point.Empty, rectangle, colorBlending, alphaComposition, opacity); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the current one by blending their pixels.
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="image">The image to blend with the currently processing image.</param>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="image">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="options">The options, including the blending type and blending amount.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixelDst}"/>.</returns>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image image, |
|
|
|
@ -127,13 +127,13 @@ public static class DrawImageExtensions |
|
|
|
=> DrawImage(source, image, Point.Empty, options); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the current one by blending their pixels.
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="image">The image to blend with the currently processing image.</param>
|
|
|
|
/// <param name="rectangle">The <see cref="Rectangle"/> structure that specifies the portion of the image to draw.</param>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="image">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="rectangle">The rectangle structure that specifies the portion of the image to draw.</param>
|
|
|
|
/// <param name="options">The options, including the blending type and blending amount.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixelDst}"/>.</returns>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image image, |
|
|
|
@ -142,13 +142,13 @@ public static class DrawImageExtensions |
|
|
|
=> DrawImage(source, image, Point.Empty, rectangle, options); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the current one by blending their pixels.
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="image">The image to blend with the currently processing image.</param>
|
|
|
|
/// <param name="location">The location to draw the blended image.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to blend. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixelDst}"/>.</returns>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="image">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="location">The location on the currenty processing image at which to draw.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to draw. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image image, |
|
|
|
@ -160,14 +160,14 @@ public static class DrawImageExtensions |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the current one by blending their pixels.
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="image">The image to blend with the currently processing image.</param>
|
|
|
|
/// <param name="location">The location to draw the blended image.</param>
|
|
|
|
/// <param name="rectangle">The <see cref="Rectangle"/> structure that specifies the portion of the image to draw.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to blend. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixelDst}"/>.</returns>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="image">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="location">The location on the currenty processing image at which to draw.</param>
|
|
|
|
/// <param name="rectangle">The rectangle structure that specifies the portion of the image to draw.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to draw. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image image, |
|
|
|
@ -180,14 +180,14 @@ public static class DrawImageExtensions |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the current one by blending their pixels.
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="image">The image to blend with the currently processing image.</param>
|
|
|
|
/// <param name="location">The location to draw the blended image.</param>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="image">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="location">The location on the currenty processing image at which to draw.</param>
|
|
|
|
/// <param name="colorBlending">The color blending to apply.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to blend. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixelDst}"/>.</returns>
|
|
|
|
/// <param name="opacity">The opacity of the image to draw. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image image, |
|
|
|
@ -197,15 +197,15 @@ public static class DrawImageExtensions |
|
|
|
=> DrawImage(source, image, location, colorBlending, source.GetGraphicsOptions().AlphaCompositionMode, opacity); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the current one by blending their pixels.
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="image">The image to blend with the currently processing image.</param>
|
|
|
|
/// <param name="location">The location to draw the blended image.</param>
|
|
|
|
/// <param name="rectangle">The <see cref="Rectangle"/> structure that specifies the portion of the image to draw.</param>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="image">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="location">The location on the currenty processing image at which to draw.</param>
|
|
|
|
/// <param name="rectangle">The rectangle structure that specifies the portion of the image to draw.</param>
|
|
|
|
/// <param name="colorBlending">The color blending to apply.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to blend. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixelDst}"/>.</returns>
|
|
|
|
/// <param name="opacity">The opacity of the image to draw. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image image, |
|
|
|
@ -216,13 +216,13 @@ public static class DrawImageExtensions |
|
|
|
=> DrawImage(source, image, location, rectangle, colorBlending, source.GetGraphicsOptions().AlphaCompositionMode, opacity); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the current one by blending their pixels.
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="image">The image to blend with the currently processing image.</param>
|
|
|
|
/// <param name="location">The location to draw the blended image.</param>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="image">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="location">The location on the currenty processing image at which to draw.</param>
|
|
|
|
/// <param name="options">The options containing the blend mode and opacity.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixelDst}"/>.</returns>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image image, |
|
|
|
@ -231,14 +231,14 @@ public static class DrawImageExtensions |
|
|
|
=> DrawImage(source, image, location, options.ColorBlendingMode, options.AlphaCompositionMode, options.BlendPercentage); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the current one by blending their pixels.
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="image">The image to blend with the currently processing image.</param>
|
|
|
|
/// <param name="location">The location to draw the blended image.</param>
|
|
|
|
/// <param name="rectangle">The <see cref="Rectangle"/> structure that specifies the portion of the image to draw.</param>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="image">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="location">The location on the currenty processing image at which to draw.</param>
|
|
|
|
/// <param name="rectangle">The rectangle structure that specifies the portion of the image to draw.</param>
|
|
|
|
/// <param name="options">The options containing the blend mode and opacity.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixelDst}"/>.</returns>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image image, |
|
|
|
@ -248,15 +248,15 @@ public static class DrawImageExtensions |
|
|
|
=> DrawImage(source, image, location, rectangle, options.ColorBlendingMode, options.AlphaCompositionMode, options.BlendPercentage); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the current one by blending their pixels.
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="image">The image to blend with the currently processing image.</param>
|
|
|
|
/// <param name="location">The location to draw the blended image.</param>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="image">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="location">The location on the currenty processing image at which to draw.</param>
|
|
|
|
/// <param name="colorBlending">The color blending to apply.</param>
|
|
|
|
/// <param name="alphaComposition">The alpha composition mode.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to blend. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixelDst}"/>.</returns>
|
|
|
|
/// <param name="opacity">The opacity of the image to draw. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image image, |
|
|
|
@ -267,16 +267,16 @@ public static class DrawImageExtensions |
|
|
|
=> source.ApplyProcessor(new DrawImageProcessor(image, location, colorBlending, alphaComposition, opacity)); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the current one by blending their pixels.
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="image">The image to blend with the currently processing image.</param>
|
|
|
|
/// <param name="location">The location to draw the blended image.</param>
|
|
|
|
/// <param name="rectangle">The <see cref="Rectangle"/> structure that specifies the portion of the image to draw.</param>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="image">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="location">The location on the currenty processing image at which to draw.</param>
|
|
|
|
/// <param name="rectangle">The rectangle structure that specifies the portion of the image to draw.</param>
|
|
|
|
/// <param name="colorBlending">The color blending to apply.</param>
|
|
|
|
/// <param name="alphaComposition">The alpha composition mode.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to blend. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixelDst}"/>.</returns>
|
|
|
|
/// <param name="opacity">The opacity of the image to draw. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image image, |
|
|
|
|