|
|
|
@ -22,9 +22,27 @@ public static class DrawImageExtensions |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image foreground, |
|
|
|
float opacity) |
|
|
|
=> DrawImage(source, foreground, opacity, 0); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="foreground">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>
|
|
|
|
/// <param name="foregroundRepeatCount">
|
|
|
|
/// The number of times the foreground frames are allowed to loop while applying this operation across successive frames.
|
|
|
|
/// A value of 0 means loop indefinitely.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image foreground, |
|
|
|
float opacity, |
|
|
|
int foregroundRepeatCount) |
|
|
|
{ |
|
|
|
GraphicsOptions options = source.GetGraphicsOptions(); |
|
|
|
return DrawImage(source, foreground, options.ColorBlendingMode, options.AlphaCompositionMode, opacity); |
|
|
|
return DrawImage(source, foreground, options.ColorBlendingMode, options.AlphaCompositionMode, opacity, foregroundRepeatCount); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -40,9 +58,29 @@ public static class DrawImageExtensions |
|
|
|
Image foreground, |
|
|
|
Rectangle foregroundRectangle, |
|
|
|
float opacity) |
|
|
|
=> DrawImage(source, foreground, foregroundRectangle, opacity, 0); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="foreground">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="foregroundRectangle">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>
|
|
|
|
/// <param name="foregroundRepeatCount">
|
|
|
|
/// The number of times the foreground frames are allowed to loop while applying this operation across successive frames.
|
|
|
|
/// A value of 0 means loop indefinitely.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image foreground, |
|
|
|
Rectangle foregroundRectangle, |
|
|
|
float opacity, |
|
|
|
int foregroundRepeatCount) |
|
|
|
{ |
|
|
|
GraphicsOptions options = source.GetGraphicsOptions(); |
|
|
|
return DrawImage(source, foreground, foregroundRectangle, options.ColorBlendingMode, options.AlphaCompositionMode, opacity); |
|
|
|
return DrawImage(source, foreground, foregroundRectangle, options.ColorBlendingMode, options.AlphaCompositionMode, opacity, foregroundRepeatCount); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -58,7 +96,27 @@ public static class DrawImageExtensions |
|
|
|
Image foreground, |
|
|
|
PixelColorBlendingMode colorBlending, |
|
|
|
float opacity) |
|
|
|
=> DrawImage(source, foreground, Point.Empty, colorBlending, opacity); |
|
|
|
=> DrawImage(source, foreground, colorBlending, opacity, 0); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="foreground">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>
|
|
|
|
/// <param name="foregroundRepeatCount">
|
|
|
|
/// The number of times the foreground frames are allowed to loop while applying this operation across successive frames.
|
|
|
|
/// A value of 0 means loop indefinitely.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image foreground, |
|
|
|
PixelColorBlendingMode colorBlending, |
|
|
|
float opacity, |
|
|
|
int foregroundRepeatCount) |
|
|
|
=> DrawImage(source, foreground, Point.Empty, colorBlending, opacity, foregroundRepeatCount); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
@ -75,7 +133,29 @@ public static class DrawImageExtensions |
|
|
|
Rectangle foregroundRectangle, |
|
|
|
PixelColorBlendingMode colorBlending, |
|
|
|
float opacity) |
|
|
|
=> DrawImage(source, foreground, foregroundRectangle, colorBlending, source.GetGraphicsOptions().AlphaCompositionMode, opacity); |
|
|
|
=> DrawImage(source, foreground, foregroundRectangle, colorBlending, opacity, 0); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="foreground">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="foregroundRectangle">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>
|
|
|
|
/// <param name="foregroundRepeatCount">
|
|
|
|
/// The number of times the foreground frames are allowed to loop while applying this operation across successive frames.
|
|
|
|
/// A value of 0 means loop indefinitely.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image foreground, |
|
|
|
Rectangle foregroundRectangle, |
|
|
|
PixelColorBlendingMode colorBlending, |
|
|
|
float opacity, |
|
|
|
int foregroundRepeatCount) |
|
|
|
=> DrawImage(source, foreground, Point.Empty, foregroundRectangle, colorBlending, opacity, foregroundRepeatCount); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
@ -92,7 +172,29 @@ public static class DrawImageExtensions |
|
|
|
PixelColorBlendingMode colorBlending, |
|
|
|
PixelAlphaCompositionMode alphaComposition, |
|
|
|
float opacity) |
|
|
|
=> DrawImage(source, foreground, Point.Empty, colorBlending, alphaComposition, opacity); |
|
|
|
=> DrawImage(source, foreground, colorBlending, alphaComposition, opacity, 0); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="foreground">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 draw. Must be between 0 and 1.</param>
|
|
|
|
/// <param name="foregroundRepeatCount">
|
|
|
|
/// The number of times the foreground frames are allowed to loop while applying this operation across successive frames.
|
|
|
|
/// A value of 0 means loop indefinitely.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image foreground, |
|
|
|
PixelColorBlendingMode colorBlending, |
|
|
|
PixelAlphaCompositionMode alphaComposition, |
|
|
|
float opacity, |
|
|
|
int foregroundRepeatCount) |
|
|
|
=> DrawImage(source, foreground, Point.Empty, colorBlending, alphaComposition, opacity, foregroundRepeatCount); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
@ -111,7 +213,31 @@ public static class DrawImageExtensions |
|
|
|
PixelColorBlendingMode colorBlending, |
|
|
|
PixelAlphaCompositionMode alphaComposition, |
|
|
|
float opacity) |
|
|
|
=> DrawImage(source, foreground, Point.Empty, foregroundRectangle, colorBlending, alphaComposition, opacity); |
|
|
|
=> DrawImage(source, foreground, foregroundRectangle, colorBlending, alphaComposition, opacity, 0); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="foreground">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="foregroundRectangle">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 draw. Must be between 0 and 1.</param>
|
|
|
|
/// <param name="foregroundRepeatCount">
|
|
|
|
/// The number of times the foreground frames are allowed to loop while applying this operation across successive frames.
|
|
|
|
/// A value of 0 means loop indefinitely.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image foreground, |
|
|
|
Rectangle foregroundRectangle, |
|
|
|
PixelColorBlendingMode colorBlending, |
|
|
|
PixelAlphaCompositionMode alphaComposition, |
|
|
|
float opacity, |
|
|
|
int foregroundRepeatCount) |
|
|
|
=> DrawImage(source, foreground, Point.Empty, foregroundRectangle, colorBlending, alphaComposition, opacity, foregroundRepeatCount); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
@ -124,7 +250,25 @@ public static class DrawImageExtensions |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image foreground, |
|
|
|
GraphicsOptions options) |
|
|
|
=> DrawImage(source, foreground, Point.Empty, options); |
|
|
|
=> DrawImage(source, foreground, options, 0); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="foreground">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="options">The options, including the blending type and blending amount.</param>
|
|
|
|
/// <param name="foregroundRepeatCount">
|
|
|
|
/// The number of times the foreground frames are allowed to loop while applying this operation across successive frames.
|
|
|
|
/// A value of 0 means loop indefinitely.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image foreground, |
|
|
|
GraphicsOptions options, |
|
|
|
int foregroundRepeatCount) |
|
|
|
=> DrawImage(source, foreground, Point.Empty, options, foregroundRepeatCount); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
@ -139,7 +283,27 @@ public static class DrawImageExtensions |
|
|
|
Image foreground, |
|
|
|
Rectangle foregroundRectangle, |
|
|
|
GraphicsOptions options) |
|
|
|
=> DrawImage(source, foreground, Point.Empty, foregroundRectangle, options); |
|
|
|
=> DrawImage(source, foreground, foregroundRectangle, options, 0); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="foreground">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="foregroundRectangle">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>
|
|
|
|
/// <param name="foregroundRepeatCount">
|
|
|
|
/// The number of times the foreground frames are allowed to loop while applying this operation across successive frames.
|
|
|
|
/// A value of 0 means loop indefinitely.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image foreground, |
|
|
|
Rectangle foregroundRectangle, |
|
|
|
GraphicsOptions options, |
|
|
|
int foregroundRepeatCount) |
|
|
|
=> DrawImage(source, foreground, Point.Empty, foregroundRectangle, options, foregroundRepeatCount); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
@ -154,9 +318,29 @@ public static class DrawImageExtensions |
|
|
|
Image foreground, |
|
|
|
Point backgroundLocation, |
|
|
|
float opacity) |
|
|
|
=> DrawImage(source, foreground, backgroundLocation, opacity, 0); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="foreground">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="backgroundLocation">The location on the currently processing image at which to draw.</param>
|
|
|
|
/// <param name="opacity">The opacity of the image to draw. Must be between 0 and 1.</param>
|
|
|
|
/// <param name="foregroundRepeatCount">
|
|
|
|
/// The number of times the foreground frames are allowed to loop while applying this operation across successive frames.
|
|
|
|
/// A value of 0 means loop indefinitely.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image foreground, |
|
|
|
Point backgroundLocation, |
|
|
|
float opacity, |
|
|
|
int foregroundRepeatCount) |
|
|
|
{ |
|
|
|
GraphicsOptions options = source.GetGraphicsOptions(); |
|
|
|
return DrawImage(source, foreground, backgroundLocation, options.ColorBlendingMode, options.AlphaCompositionMode, opacity); |
|
|
|
return DrawImage(source, foreground, backgroundLocation, options.ColorBlendingMode, options.AlphaCompositionMode, opacity, foregroundRepeatCount); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -174,9 +358,31 @@ public static class DrawImageExtensions |
|
|
|
Point backgroundLocation, |
|
|
|
Rectangle foregroundRectangle, |
|
|
|
float opacity) |
|
|
|
=> DrawImage(source, foreground, backgroundLocation, foregroundRectangle, opacity, 0); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="foreground">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="backgroundLocation">The location on the currently processing image at which to draw.</param>
|
|
|
|
/// <param name="foregroundRectangle">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>
|
|
|
|
/// <param name="foregroundRepeatCount">
|
|
|
|
/// The number of times the foreground frames are allowed to loop while applying this operation across successive frames.
|
|
|
|
/// A value of 0 means loop indefinitely.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image foreground, |
|
|
|
Point backgroundLocation, |
|
|
|
Rectangle foregroundRectangle, |
|
|
|
float opacity, |
|
|
|
int foregroundRepeatCount) |
|
|
|
{ |
|
|
|
GraphicsOptions options = source.GetGraphicsOptions(); |
|
|
|
return DrawImage(source, foreground, backgroundLocation, foregroundRectangle, options.ColorBlendingMode, options.AlphaCompositionMode, opacity); |
|
|
|
return DrawImage(source, foreground, backgroundLocation, foregroundRectangle, options.ColorBlendingMode, options.AlphaCompositionMode, opacity, foregroundRepeatCount); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -194,7 +400,29 @@ public static class DrawImageExtensions |
|
|
|
Point backgroundLocation, |
|
|
|
PixelColorBlendingMode colorBlending, |
|
|
|
float opacity) |
|
|
|
=> DrawImage(source, foreground, backgroundLocation, colorBlending, source.GetGraphicsOptions().AlphaCompositionMode, opacity); |
|
|
|
=> DrawImage(source, foreground, backgroundLocation, colorBlending, opacity, 0); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="foreground">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="backgroundLocation">The location on the currently 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 draw. Must be between 0 and 1.</param>
|
|
|
|
/// <param name="foregroundRepeatCount">
|
|
|
|
/// The number of times the foreground frames are allowed to loop while applying this operation across successive frames.
|
|
|
|
/// A value of 0 means loop indefinitely.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image foreground, |
|
|
|
Point backgroundLocation, |
|
|
|
PixelColorBlendingMode colorBlending, |
|
|
|
float opacity, |
|
|
|
int foregroundRepeatCount) |
|
|
|
=> DrawImage(source, foreground, backgroundLocation, colorBlending, source.GetGraphicsOptions().AlphaCompositionMode, opacity, foregroundRepeatCount); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
@ -213,7 +441,31 @@ public static class DrawImageExtensions |
|
|
|
Rectangle foregroundRectangle, |
|
|
|
PixelColorBlendingMode colorBlending, |
|
|
|
float opacity) |
|
|
|
=> DrawImage(source, foreground, backgroundLocation, foregroundRectangle, colorBlending, source.GetGraphicsOptions().AlphaCompositionMode, opacity); |
|
|
|
=> DrawImage(source, foreground, backgroundLocation, foregroundRectangle, colorBlending, opacity, 0); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="foreground">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="backgroundLocation">The location on the currently processing image at which to draw.</param>
|
|
|
|
/// <param name="foregroundRectangle">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 draw. Must be between 0 and 1.</param>
|
|
|
|
/// <param name="foregroundRepeatCount">
|
|
|
|
/// The number of times the foreground frames are allowed to loop while applying this operation across successive frames.
|
|
|
|
/// A value of 0 means loop indefinitely.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image foreground, |
|
|
|
Point backgroundLocation, |
|
|
|
Rectangle foregroundRectangle, |
|
|
|
PixelColorBlendingMode colorBlending, |
|
|
|
float opacity, |
|
|
|
int foregroundRepeatCount) |
|
|
|
=> DrawImage(source, foreground, backgroundLocation, foregroundRectangle, colorBlending, source.GetGraphicsOptions().AlphaCompositionMode, opacity, foregroundRepeatCount); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
@ -228,7 +480,27 @@ public static class DrawImageExtensions |
|
|
|
Image foreground, |
|
|
|
Point backgroundLocation, |
|
|
|
GraphicsOptions options) |
|
|
|
=> DrawImage(source, foreground, backgroundLocation, options.ColorBlendingMode, options.AlphaCompositionMode, options.BlendPercentage); |
|
|
|
=> DrawImage(source, foreground, backgroundLocation, options, 0); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="foreground">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="backgroundLocation">The location on the currently processing image at which to draw.</param>
|
|
|
|
/// <param name="options">The options containing the blend mode and opacity.</param>
|
|
|
|
/// <param name="foregroundRepeatCount">
|
|
|
|
/// The number of times the foreground frames are allowed to loop while applying this operation across successive frames.
|
|
|
|
/// A value of 0 means loop indefinitely.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image foreground, |
|
|
|
Point backgroundLocation, |
|
|
|
GraphicsOptions options, |
|
|
|
int foregroundRepeatCount) |
|
|
|
=> DrawImage(source, foreground, backgroundLocation, options.ColorBlendingMode, options.AlphaCompositionMode, options.BlendPercentage, foregroundRepeatCount); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
@ -245,7 +517,48 @@ public static class DrawImageExtensions |
|
|
|
Point backgroundLocation, |
|
|
|
Rectangle foregroundRectangle, |
|
|
|
GraphicsOptions options) |
|
|
|
=> DrawImage(source, foreground, backgroundLocation, foregroundRectangle, options.ColorBlendingMode, options.AlphaCompositionMode, options.BlendPercentage); |
|
|
|
=> DrawImage(source, foreground, backgroundLocation, foregroundRectangle, options, 0); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="foreground">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="backgroundLocation">The location on the currently processing image at which to draw.</param>
|
|
|
|
/// <param name="foregroundRectangle">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>
|
|
|
|
/// <param name="foregroundRepeatCount">
|
|
|
|
/// The number of times the foreground frames are allowed to loop while applying this operation across successive frames.
|
|
|
|
/// A value of 0 means loop indefinitely.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image foreground, |
|
|
|
Point backgroundLocation, |
|
|
|
Rectangle foregroundRectangle, |
|
|
|
GraphicsOptions options, |
|
|
|
int foregroundRepeatCount) |
|
|
|
=> DrawImage(source, foreground, backgroundLocation, foregroundRectangle, options.ColorBlendingMode, options.AlphaCompositionMode, options.BlendPercentage, foregroundRepeatCount); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="foreground">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="backgroundLocation">The location on the currently 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 draw. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image foreground, |
|
|
|
Point backgroundLocation, |
|
|
|
PixelColorBlendingMode colorBlending, |
|
|
|
PixelAlphaCompositionMode alphaComposition, |
|
|
|
float opacity) |
|
|
|
=> DrawImage(source, foreground, backgroundLocation, colorBlending, alphaComposition, opacity, 0); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
@ -256,6 +569,10 @@ public static class DrawImageExtensions |
|
|
|
/// <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 draw. Must be between 0 and 1.</param>
|
|
|
|
/// <param name="foregroundRepeatCount">
|
|
|
|
/// The number of times the foreground frames are allowed to loop while applying this operation across successive frames.
|
|
|
|
/// A value of 0 means loop indefinitely.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
@ -263,8 +580,30 @@ public static class DrawImageExtensions |
|
|
|
Point backgroundLocation, |
|
|
|
PixelColorBlendingMode colorBlending, |
|
|
|
PixelAlphaCompositionMode alphaComposition, |
|
|
|
float opacity, |
|
|
|
int foregroundRepeatCount) |
|
|
|
=> source.ApplyProcessor(new DrawImageProcessor(foreground, backgroundLocation, foreground.Bounds, colorBlending, alphaComposition, opacity, foregroundRepeatCount)); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="source">The current image processing context.</param>
|
|
|
|
/// <param name="foreground">The image to draw on the currently processing image.</param>
|
|
|
|
/// <param name="backgroundLocation">The location on the currently processing image at which to draw.</param>
|
|
|
|
/// <param name="foregroundRectangle">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 draw. Must be between 0 and 1.</param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
Image foreground, |
|
|
|
Point backgroundLocation, |
|
|
|
Rectangle foregroundRectangle, |
|
|
|
PixelColorBlendingMode colorBlending, |
|
|
|
PixelAlphaCompositionMode alphaComposition, |
|
|
|
float opacity) |
|
|
|
=> source.ApplyProcessor(new DrawImageProcessor(foreground, backgroundLocation, foreground.Bounds, colorBlending, alphaComposition, opacity)); |
|
|
|
=> DrawImage(source, foreground, backgroundLocation, foregroundRectangle, colorBlending, alphaComposition, opacity, 0); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws the given image together with the currently processing image by blending their pixels.
|
|
|
|
@ -276,6 +615,10 @@ public static class DrawImageExtensions |
|
|
|
/// <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 draw. Must be between 0 and 1.</param>
|
|
|
|
/// <param name="foregroundRepeatCount">
|
|
|
|
/// The number of times the foreground frames are allowed to loop while applying this operation across successive frames.
|
|
|
|
/// A value of 0 means loop indefinitely.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
|
|
|
|
public static IImageProcessingContext DrawImage( |
|
|
|
this IImageProcessingContext source, |
|
|
|
@ -284,8 +627,9 @@ public static class DrawImageExtensions |
|
|
|
Rectangle foregroundRectangle, |
|
|
|
PixelColorBlendingMode colorBlending, |
|
|
|
PixelAlphaCompositionMode alphaComposition, |
|
|
|
float opacity) => |
|
|
|
float opacity, |
|
|
|
int foregroundRepeatCount) => |
|
|
|
source.ApplyProcessor( |
|
|
|
new DrawImageProcessor(foreground, backgroundLocation, foregroundRectangle, colorBlending, alphaComposition, opacity), |
|
|
|
new DrawImageProcessor(foreground, backgroundLocation, foregroundRectangle, colorBlending, alphaComposition, opacity, foregroundRepeatCount), |
|
|
|
foregroundRectangle); |
|
|
|
} |
|
|
|
|