Class Brush
Represents a logical configuration of a brush which can be used to source pixel colors.
Inheritance
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Drawing.Processing
Assembly: SixLabors.ImageSharp.Drawing.dll
Syntax
public abstract class Brush : IEquatable<Brush>
Remarks
A brush is a simple class that will return an BrushApplicator<TPixel> that will perform the logic for retrieving pixel values for specific locations.
Methods
| Edit this page View SourceCreateApplicator<TPixel>(Configuration, GraphicsOptions, ImageFrame<TPixel>, RectangleF)
Creates the applicator for this brush.
Declaration
public abstract BrushApplicator<TPixel> CreateApplicator<TPixel>(Configuration configuration, GraphicsOptions options, ImageFrame<TPixel> source, RectangleF region) where TPixel : unmanaged, IPixel<TPixel>
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The configuration instance to use when performing operations. |
GraphicsOptions | options | The graphic options. |
ImageFrame<TPixel> | source | The source image. |
RectangleF | region | The region the brush will be applied to. |
Returns
Type | Description |
---|---|
BrushApplicator<TPixel> | The BrushApplicator<TPixel> for this brush. |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel type. |
Remarks
The region
when being applied to things like shapes would usually be the
bounding box of the shape not necessarily the bounds of the whole image.
Equals(Brush?)
Indicates whether the current object is equal to another object of the same type.
Declaration
public abstract bool Equals(Brush? other)
Parameters
Type | Name | Description |
---|---|---|
Brush | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Equals(object?)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
| Edit this page View SourceGetHashCode()
Serves as the default hash function.
Declaration
public override abstract int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |