# ShadingPattern Class

> A shading pattern consists of a smoothly varying gradient between two colors.

- Product: Adobe PDF Library 21
- Language: .NET Framework
- Version: APDFL21.0.0PlusP1e
- HTML page: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/ShadingPattern
- Version index: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/llms.txt

```csharp
class ShadingPattern : Pattern
```

**Namespace:** `Datalogics::PDFL`

**Inherits from:** [`Pattern`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/Pattern.md)

**Derived classes:** [`AxialShadingPattern`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/AxialShadingPattern.md)

## Description

A shading pattern consists of a smoothly varying gradient between two colors.

**Uses types:** [`Color`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/Color.md), [`ColorSpace`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/ColorSpace.md), [`PDFObject`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/PDFObject.md), [`Rect`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/Rect.md)

## Properties

### AntiAlias

```csharp
bool Datalogics.PDFL.ShadingPattern.AntiAlias { get; set; }
```

Gets whether anti-aliasing is enabled for the shading.

When enabled, the shading function is filtered to prevent aliasing artifacts.

### BackgroundColor

```csharp
Color Datalogics.PDFL.ShadingPattern.BackgroundColor { get; set; }
```

Gets the background color of the shading pattern.

This color must be in the color space of the shading pattern. If present, it is used to fill the areas that are outside the bounds of the shading object. May be NULL.

### BoundingBox

```csharp
Rect Datalogics.PDFL.ShadingPattern.BoundingBox { get; set; }
```

Gets the bounding box of the shading.

The coordinates are interpreted in the target coordinate space. If present, provides an additional, temporary clipping boundary to the shading.

### ColorSpace

```csharp
ColorSpace Datalogics.PDFL.ShadingPattern.ColorSpace { get; set; }
```

Gets the color space of a shading pattern.

This space is restricted to be any space except a Pattern space.

### PDFObject

```csharp
PDFObject Datalogics.PDFL.Pattern.PDFObject { get; }
```

Gets the underlying PDF object for this pattern.

## Methods

### Dispose

```csharp
void Datalogics.PDFL.Pattern.Dispose()
```

**Returns:** `void`

### ToString

```csharp
override string Datalogics.PDFL.ShadingPattern.ToString()
```

**Returns:** `override string`

A string describing the shading pattern.

Converts the shading pattern to a string representation.
