# PdfLinearGradientBrush class

> A gradient along a line between two points, in canvas coordinates.

Namespace: [PdfNetStack.Drawing](https://www.jadev-corp.com/api/pdfnetstack-drawing/)  
Assembly: PdfNetStack.dll  
Package: `PdfNetStack`

A gradient along a line between two points, in canvas coordinates.

```csharp
public sealed class PdfLinearGradientBrush : PdfGradientBrush
```

**Inheritance**

[object](https://learn.microsoft.com/dotnet/api/system.object) ← 
[PdfBrush](https://www.jadev-corp.com/api/pdfnetstack-drawing/pdfbrush/) ← 
[PdfGradientBrush](https://www.jadev-corp.com/api/pdfnetstack-drawing/pdfgradientbrush/) ← 
[PdfLinearGradientBrush](https://www.jadev-corp.com/api/pdfnetstack-drawing/pdflineargradientbrush/)

## Constructors

### <a id="PdfNetStack_Drawing_PdfLinearGradientBrush__ctor_PdfNetStack_Drawing_PdfPoint_PdfNetStack_Drawing_PdfPoint_System_Collections_Generic_IEnumerable_PdfNetStack_Drawing_PdfGradientStop__System_Boolean_"></a> PdfLinearGradientBrush\(PdfPoint, PdfPoint, IEnumerable&lt;PdfGradientStop\>, bool\)

Creates a linear gradient from <code class="paramref">start</code> to <code class="paramref">end</code>.

```csharp
public PdfLinearGradientBrush(PdfPoint start, PdfPoint end, IEnumerable<PdfGradientStop> stops, bool extend = true)
```

#### Parameters

`start` [PdfPoint](https://www.jadev-corp.com/api/pdfnetstack-drawing/pdfpoint/)

`end` [PdfPoint](https://www.jadev-corp.com/api/pdfnetstack-drawing/pdfpoint/)

`stops` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable\-1)<[PdfGradientStop](https://www.jadev-corp.com/api/pdfnetstack-drawing/pdfgradientstop/)\>

`extend` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="PdfNetStack_Drawing_PdfLinearGradientBrush__ctor_PdfNetStack_Drawing_PdfPoint_PdfNetStack_Drawing_PdfPoint_PdfNetStack_Drawing_PdfColor_PdfNetStack_Drawing_PdfColor_"></a> PdfLinearGradientBrush\(PdfPoint, PdfPoint, PdfColor, PdfColor\)

Creates a two color linear gradient.

```csharp
public PdfLinearGradientBrush(PdfPoint start, PdfPoint end, PdfColor startColor, PdfColor endColor)
```

#### Parameters

`start` [PdfPoint](https://www.jadev-corp.com/api/pdfnetstack-drawing/pdfpoint/)

`end` [PdfPoint](https://www.jadev-corp.com/api/pdfnetstack-drawing/pdfpoint/)

`startColor` [PdfColor](https://www.jadev-corp.com/api/pdfnetstack-drawing/pdfcolor/)

`endColor` [PdfColor](https://www.jadev-corp.com/api/pdfnetstack-drawing/pdfcolor/)

## Properties

### <a id="PdfNetStack_Drawing_PdfLinearGradientBrush_End"></a> End

Where offset 1 lies.

```csharp
public PdfPoint End { get; }
```

#### Property Value

 [PdfPoint](https://www.jadev-corp.com/api/pdfnetstack-drawing/pdfpoint/)

### <a id="PdfNetStack_Drawing_PdfLinearGradientBrush_Start"></a> Start

Where offset 0 lies.

```csharp
public PdfPoint Start { get; }
```

#### Property Value

 [PdfPoint](https://www.jadev-corp.com/api/pdfnetstack-drawing/pdfpoint/)

## Used in

- [Draw on PDF pages in C# and .NET](https://www.jadev-corp.com/guides/drawing/)

Source: https://www.jadev-corp.com/pdfnetstack/api/pdfnetstack-drawing/pdflineargradientbrush/
