Method CreateImageBrush
- Namespace
- PaintDotNet.Direct2D1
- Assembly
- PaintDotNet.Windows.dll
CreateImageBrush(IDeviceImage?, in ImageBrushProperties, in BrushProperties?)
Creates an image brush. The input image can be any type of image, including a bitmap, effect, or a command list.
IImageBrush CreateImageBrush(IDeviceImage? image, in ImageBrushProperties imageBrushProperties, in BrushProperties? brushProperties = null)
Parameters
imageIDeviceImageThe image to be used as a source for the image brush, or null for a brush with no image. Drawing with a brush that has no image fails with ArgumentException.
imageBrushPropertiesImageBrushPropertiesThe properties specific to an image brush.
brushPropertiesBrushProperties?Properties common to all brushes.
Returns
- IImageBrush
The new image brush.
Remarks
The image brush can be used to fill an arbitrary geometry, an opacity mask, or text.