Class DrawImageProcessor
Combines two images together by blending the pixels.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Processing.Processors.Drawing
Assembly: SixLabors.ImageSharp.dll
Syntax
public class DrawImageProcessor : IImageProcessor
Constructors
| Edit this page View SourceDrawImageProcessor(Image, Point, PixelColorBlendingMode, PixelAlphaCompositionMode, float)
Initializes a new instance of the DrawImageProcessor class.
Declaration
public DrawImageProcessor(Image foreground, Point backgroundLocation, PixelColorBlendingMode colorBlendingMode, PixelAlphaCompositionMode alphaCompositionMode, float opacity)
Parameters
Type | Name | Description |
---|---|---|
Image | foreground | The image to blend. |
Point | backgroundLocation | The location to draw the foreground image on the background. |
PixelColorBlendingMode | colorBlendingMode | The blending mode to use when drawing the image. |
PixelAlphaCompositionMode | alphaCompositionMode | The Alpha blending mode to use when drawing the image. |
float | opacity | The opacity of the image to blend. |
DrawImageProcessor(Image, Point, Rectangle, PixelColorBlendingMode, PixelAlphaCompositionMode, float)
Initializes a new instance of the DrawImageProcessor class.
Declaration
public DrawImageProcessor(Image foreground, Point backgroundLocation, Rectangle foregroundRectangle, PixelColorBlendingMode colorBlendingMode, PixelAlphaCompositionMode alphaCompositionMode, float opacity)
Parameters
Type | Name | Description |
---|---|---|
Image | foreground | The image to blend. |
Point | backgroundLocation | The location to draw the foreground image on the background. |
Rectangle | foregroundRectangle | The rectangular portion of the foreground image to draw. |
PixelColorBlendingMode | colorBlendingMode | The blending mode to use when drawing the image. |
PixelAlphaCompositionMode | alphaCompositionMode | The Alpha blending mode to use when drawing the image. |
float | opacity | The opacity of the image to blend. |
Properties
| Edit this page View SourceAlphaCompositionMode
Gets the Alpha blending mode to use when drawing the image.
Declaration
public PixelAlphaCompositionMode AlphaCompositionMode { get; }
Property Value
Type | Description |
---|---|
PixelAlphaCompositionMode |
BackgroundLocation
Gets the location to draw the foreground image on the background.
Declaration
public Point BackgroundLocation { get; }
Property Value
Type | Description |
---|---|
Point |
ColorBlendingMode
Gets the blending mode to use when drawing the image.
Declaration
public PixelColorBlendingMode ColorBlendingMode { get; }
Property Value
Type | Description |
---|---|
PixelColorBlendingMode |
ForeGround
Gets the image to blend.
Declaration
public Image ForeGround { get; }
Property Value
Type | Description |
---|---|
Image |
ForegroundRectangle
Gets the rectangular portion of the foreground image to draw.
Declaration
public Rectangle ForegroundRectangle { get; }
Property Value
Type | Description |
---|---|
Rectangle |
Opacity
Gets the opacity of the image to blend.
Declaration
public float Opacity { get; }
Property Value
Type | Description |
---|---|
float |
Methods
| Edit this page View SourceCreatePixelSpecificProcessor<TPixelBg>(Configuration, Image<TPixelBg>, Rectangle)
Creates a pixel specific IImageProcessor<TPixel> that is capable of executing the processing algorithm on an Image<TPixel>.
Declaration
public IImageProcessor<TPixelBg> CreatePixelSpecificProcessor<TPixelBg>(Configuration configuration, Image<TPixelBg> source, Rectangle sourceRectangle) where TPixelBg : unmanaged, IPixel<TPixelBg>
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The configuration which allows altering default behaviour or extending the library. |
Image<TPixelBg> | source | The source image. Cannot be null. |
Rectangle | sourceRectangle | The Rectangle structure that specifies the portion of the image object to draw. |
Returns
Type | Description |
---|---|
IImageProcessor<TPixelBg> |
Type Parameters
Name | Description |
---|---|
TPixelBg |