• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.ImageSharp.Drawing
      • ArcLineSegment
      • ClipPathExtensions
      • ClippingOperation
      • ComplexPolygon
      • CubicBezierLineSegment
      • EllipsePolygon
      • EmptyPath
      • EndCapStyle
      • ILineSegment
      • IPath
      • IPathCollection
      • ISimplePath
      • IntersectionRule
      • JointStyle
      • LinearLineSegment
      • OutlinePathExtensions
      • Path
      • PathBuilder
      • PathCollection
      • PathExtensions
      • PathTypes
      • Polygon
      • RectangularPolygon
      • RegularPolygon
      • SegmentInfo
      • Star
      • TextBuilder
    • SixLabors.ImageSharp.Drawing.Processing
      • Brush
      • BrushApplicator<TPixel>
      • Brushes
      • ClearExtensions
      • ClearPathExtensions
      • ClearRectangleExtensions
      • ClipPathExtensions
      • ColorStop
      • DrawBezierExtensions
      • DrawLineExtensions
      • DrawPathCollectionExtensions
      • DrawPathExtensions
      • DrawPolygonExtensions
      • DrawRectangleExtensions
      • DrawTextExtensions
      • DrawingOptions
      • DrawingOptionsDefaultsExtensions
      • EllipticGradientBrush
      • FillExtensions
      • FillPathBuilderExtensions
      • FillPathCollectionExtensions
      • FillPathExtensions
      • FillPolygonExtensions
      • FillRectangleExtensions
      • GradientBrush
      • GradientRepetitionMode
      • ImageBrush
      • LinearGradientBrush
      • PathGradientBrush
      • PatternBrush
      • PatternPen
      • Pen
      • PenOptions
      • Pens
      • RadialGradientBrush
      • RecolorBrush
      • RichTextOptions
      • RichTextRun
      • ShapeGraphicOptionsDefaultsExtensions
      • ShapeOptions
      • SolidBrush
      • SolidPen
    • SixLabors.ImageSharp.Drawing.Processing.Processors.Drawing
      • ClipPathProcessor
      • DrawPathProcessor
      • FillPathProcessor
      • FillProcessor
    • SixLabors.ImageSharp.Drawing.Processing.Processors.Text
      • DrawTextProcessor
    • SixLabors.ImageSharp.Drawing.Shapes.PolygonClipper
      • ClipperException
      • ClippingType

    Class ImageBrush

    Provides an implementation of an image brush for painting images within areas.

    Inheritance
    object
    Brush
    ImageBrush
    Implements
    IEquatable<Brush>
    Inherited Members
    Brush.Equals(object)
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SixLabors.ImageSharp.Drawing.Processing
    Assembly: SixLabors.ImageSharp.Drawing.dll
    Syntax
    public class ImageBrush : Brush, IEquatable<Brush>

    Constructors

    | Edit this page View Source

    ImageBrush(Image)

    Initializes a new instance of the ImageBrush class.

    Declaration
    public ImageBrush(Image image)
    Parameters
    Type Name Description
    Image image

    The source image to draw.

    | Edit this page View Source

    ImageBrush(Image, Point)

    Initializes a new instance of the ImageBrush class.

    Declaration
    public ImageBrush(Image image, Point offset)
    Parameters
    Type Name Description
    Image image

    The image.

    Point offset

    An offset to apply the to image image while drawing apply the texture.

    | Edit this page View Source

    ImageBrush(Image, RectangleF)

    Initializes a new instance of the ImageBrush class.

    Declaration
    public ImageBrush(Image image, RectangleF region)
    Parameters
    Type Name Description
    Image image

    The image.

    RectangleF region

    The region of interest. This overrides any region used to initialize the brush applicator.

    | Edit this page View Source

    ImageBrush(Image, RectangleF, Point)

    Initializes a new instance of the ImageBrush class.

    Declaration
    public ImageBrush(Image image, RectangleF region, Point offset)
    Parameters
    Type Name Description
    Image image

    The image.

    RectangleF region

    The region of interest. This overrides any region used to initialize the brush applicator.

    Point offset

    An offset to apply the to image image while drawing apply the texture.

    Methods

    | Edit this page View Source

    CreateApplicator<TPixel>(Configuration, GraphicsOptions, ImageFrame<TPixel>, RectangleF)

    Creates the applicator for this brush.

    Declaration
    public override 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.

    Overrides
    Brush.CreateApplicator<TPixel>(Configuration, GraphicsOptions, ImageFrame<TPixel>, RectangleF)
    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.

    | Edit this page View Source

    Equals(Brush?)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public override 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 other parameter; otherwise, false.

    Overrides
    Brush.Equals(Brush?)
    | Edit this page View Source

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    Brush.GetHashCode()

    Implements

    IEquatable<T>
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX