• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.ImageSharp.Drawing
      • ClipPathExtensions
      • ComplexPolygon
      • CubicBezierLineSegment
      • EllipsePolygon
      • EndCapStyle
      • ILineSegment
      • IntersectionRule
      • IPath
      • IPathCollection
      • ISimplePath
      • JointStyle
      • LinearLineSegment
      • OutlinePathExtensions
      • Path
      • PathBuilder
      • PathCollection
      • PathExtensions
      • PathTypes
      • Polygon
      • RectangularPolygon
      • Region
      • RegularPolygon
      • SegmentInfo
      • Star
      • TextBuilder
    • SixLabors.ImageSharp.Drawing.PolygonClipper
      • ClippablePath
      • Clipper
      • ClippingType
    • SixLabors.ImageSharp.Drawing.Processing
      • BrushApplicator<TPixel>
      • Brushes
      • ClearExtensions
      • ClearPathExtensions
      • ClearRectangleExtensions
      • ClearRegionExtensions
      • ColorStop
      • DrawBezierExtensions
      • DrawingOptions
      • DrawingOptionsDefaultsExtensions
      • DrawLineExtensions
      • DrawPathCollectionExtensions
      • DrawPathExtensions
      • DrawPolygonExtensions
      • DrawRectangleExtensions
      • DrawTextExtensions
      • EllipticGradientBrush
      • FillExtensions
      • FillPathBuilderExtensions
      • FillPathCollectionExtensions
      • FillPathExtensions
      • FillPolygonExtensions
      • FillRectangleExtensions
      • FillRegionExtensions
      • GradientBrush
      • GradientRepetitionMode
      • IBrush
      • ImageBrush
      • IPen
      • LinearGradientBrush
      • PathGradientBrush
      • PatternBrush
      • Pen
      • Pens
      • RadialGradientBrush
      • RecolorBrush
      • ShapeGraphicOptionsDefaultsExtensions
      • ShapeOptions
      • SolidBrush
      • TextOptions
      • TextOptionsDefaultsExtensions
    • SixLabors.ImageSharp.Drawing.Processing.Processors.Drawing
      • DrawPathProcessor
      • FillPathProcessor
      • FillProcessor
      • FillRegionProcessor
    • SixLabors.ImageSharp.Drawing.Processing.Processors.Text
      • DrawTextProcessor

    Class LinearGradientBrush

    Provides an implementation of a brush for painting linear gradients within areas. Supported right now:

    • a set of colors in relative distances to each other.
    Inheritance
    Object
    GradientBrush
    LinearGradientBrush
    Implements
    IBrush
    Inherited Members
    GradientBrush.RepetitionMode
    GradientBrush.ColorStops
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: SixLabors.ImageSharp.Drawing.Processing
    Assembly: SixLabors.ImageSharp.Drawing.dll
    Syntax
    public sealed class LinearGradientBrush : GradientBrush, IBrush

    Constructors

    | Improve this Doc View Source

    LinearGradientBrush(PointF, PointF, GradientRepetitionMode, ColorStop[])

    Initializes a new instance of the LinearGradientBrush class.

    Declaration
    public LinearGradientBrush(PointF p1, PointF p2, GradientRepetitionMode repetitionMode, params ColorStop[] colorStops)
    Parameters
    Type Name Description
    PointF p1

    Start point

    PointF p2

    End point

    GradientRepetitionMode repetitionMode

    defines how colors are repeated.

    ColorStop[] colorStops

    Methods

    | Improve this Doc 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 : struct, 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
    SixLabors.ImageSharp.Drawing.Processing.GradientBrush.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.

    Implements

    IBrush
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX