Class DrawImageProcessor
- Namespace
- SixLabors.ImageSharp.Processing.Processors.Drawing
- Assembly
- SixLabors.ImageSharp.dll
Combines two images together by blending the pixels.
public class DrawImageProcessor : IImageProcessor
- Inheritance
-
DrawImageProcessor
- Implements
- Inherited Members
Constructors
DrawImageProcessor(Image, Point, PixelColorBlendingMode, PixelAlphaCompositionMode, float, int)
Initializes a new instance of the DrawImageProcessor class.
public DrawImageProcessor(Image foreground, Point backgroundLocation, PixelColorBlendingMode colorBlendingMode, PixelAlphaCompositionMode alphaCompositionMode, float opacity, int foregroundRepeatCount)
Parameters
foregroundImageThe image to blend.
backgroundLocationPointThe location to draw the foreground image on the background.
colorBlendingModePixelColorBlendingModeThe blending mode to use when drawing the image.
alphaCompositionModePixelAlphaCompositionModeThe Alpha blending mode to use when drawing the image.
opacityfloatThe opacity of the image to blend.
foregroundRepeatCountintThe number of times the foreground frames are allowed to loop. 0 means infinitely.
DrawImageProcessor(Image, Point, Rectangle, PixelColorBlendingMode, PixelAlphaCompositionMode, float, int)
Initializes a new instance of the DrawImageProcessor class.
public DrawImageProcessor(Image foreground, Point backgroundLocation, Rectangle foregroundRectangle, PixelColorBlendingMode colorBlendingMode, PixelAlphaCompositionMode alphaCompositionMode, float opacity, int foregroundRepeatCount)
Parameters
foregroundImageThe image to blend.
backgroundLocationPointThe location to draw the foreground image on the background.
foregroundRectangleRectangleThe rectangular portion of the foreground image to draw.
colorBlendingModePixelColorBlendingModeThe blending mode to use when drawing the image.
alphaCompositionModePixelAlphaCompositionModeThe Alpha blending mode to use when drawing the image.
opacityfloatThe opacity of the image to blend.
foregroundRepeatCountintThe number of times the foreground frames are allowed to loop. 0 means infinitely.
Properties
AlphaCompositionMode
Gets the Alpha blending mode to use when drawing the image.
public PixelAlphaCompositionMode AlphaCompositionMode { get; }
Property Value
BackgroundLocation
Gets the location to draw the foreground image on the background.
public Point BackgroundLocation { get; }
Property Value
ColorBlendingMode
Gets the blending mode to use when drawing the image.
public PixelColorBlendingMode ColorBlendingMode { get; }
Property Value
ForeGround
Gets the image to blend.
public Image ForeGround { get; }
Property Value
ForegroundRectangle
Gets the rectangular portion of the foreground image to draw.
public Rectangle ForegroundRectangle { get; }
Property Value
ForegroundRepeatCount
Gets the number of times the foreground frames are allowed to loop. 0 means infinitely.
public int ForegroundRepeatCount { get; }
Property Value
Opacity
Gets the opacity of the image to blend.
public float Opacity { get; }
Property Value
Methods
CreatePixelSpecificProcessor<TPixelBg>(Configuration, Image<TPixelBg>, Rectangle)
Creates a pixel specific IImageProcessor<TPixel> that is capable of executing the processing algorithm on an Image<TPixel>.
public IImageProcessor<TPixelBg> CreatePixelSpecificProcessor<TPixelBg>(Configuration configuration, Image<TPixelBg> source, Rectangle sourceRectangle) where TPixelBg : unmanaged, IPixel<TPixelBg>
Parameters
configurationConfigurationThe configuration which allows altering default behaviour or extending the library.
sourceImage<TPixelBg>The source image. Cannot be null.
sourceRectangleRectangleThe Rectangle structure that specifies the portion of the image object to draw.
Returns
- IImageProcessor<TPixelBg>
Type Parameters
TPixelBg