# AxialShadingPattern Class

> A color blend that varies along an axis.

- Product: Adobe PDF Library 18
- Language: Java
- Version: APDFL18.0.5PlusP2a
- HTML page: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/AxialShadingPattern
- Version index: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/llms.txt

```java
class AxialShadingPattern : ShadingPattern
```

**Namespace:** `com::datalogics::PDFL`

**Inherits from:** [`ShadingPattern`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/ShadingPattern.md)

## Description

A color blend that varies along an axis. An axial shading specifies a color blend that varies along a linear axis between two endpoints, and indefinitely perpendicular to that axis.

**Uses types:** [`Color`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Color.md), [`ColorSpace`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/ColorSpace.md), [`Function`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Function.md), [`PDFObject`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/PDFObject.md), [`Point`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Point.md), [`Rect`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Rect.md)

## Constructors

### AxialShadingPattern

```java
com.datalogics.PDFL.AxialShadingPattern.AxialShadingPattern(ColorSpace colorSpace, java.util.List< Point > coords, java.util.List< Function > function)
```

*constructor*

**Parameters**

- `colorSpace` ([`ColorSpace`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/ColorSpace.md)): The color space for the pattern.
- `coords` ([`java.util.List< Point >`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Point.md)): The coordinates of the two endpoints of the axial shading.
- `function` ([`java.util.List< Function >`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Function.md)): One 1-in n-out function, or an array of n 1-in 1-out functions that determine the values of the color channels.

Create an AxialShadingPattern.

## Methods

### delete

```java
synchronized void com.datalogics.PDFL.AxialShadingPattern.delete(Boolean disposing)
```

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

```java
synchronized void com.datalogics.PDFL.AxialShadingPattern.delete()
```

**Returns:** `synchronized void`

### finalize

```java
void com.datalogics.PDFL.AxialShadingPattern.finalize()
```

*protected*

**Returns:** `void`

### getAntiAlias

```java
boolean com.datalogics.PDFL.ShadingPattern.getAntiAlias()
```

**Returns:** `boolean`

A flag indicating whether to filter the shading function to prevent aliasing artifacts.

### getBackgroundColor

```java
Color com.datalogics.PDFL.ShadingPattern.getBackgroundColor()
```

**Returns:** [`Color`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Color.md)

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.

### getBoundingBox

```java
Rect com.datalogics.PDFL.ShadingPattern.getBoundingBox()
```

**Returns:** [`Rect`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Rect.md)

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.

### getColorSpace

```java
ColorSpace com.datalogics.PDFL.ShadingPattern.getColorSpace()
```

**Returns:** [`ColorSpace`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/ColorSpace.md)

The color space of a shading pattern. This space is restricted to be any space except a Pattern space.

### getCoords

```java
java.util.List< Point > com.datalogics.PDFL.AxialShadingPattern.getCoords()
```

**Returns:** [`java.util.List< Point >`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Point.md)

The coordinates of the two endpoints of the axial shading.

### getDomain

```java
java.util.List< Double > com.datalogics.PDFL.AxialShadingPattern.getDomain()
```

**Returns:** `java.util.List< Double >`

A array of two numbers that specify the limiting values of the parametric variable t. This variable t varies linearly between these two values as a the gradient varies between the starting and ending points of the axis.

Defaults to [0, 1]. May be NULL.

### getExtend

```java
java.util.List< Boolean > com.datalogics.PDFL.AxialShadingPattern.getExtend()
```

**Returns:** `java.util.List< Boolean >`

An array of two boolean values indicating whether to extend the shading beyond the starting and ending points of the axis, respectively.

Default value: [false, false]. May be NULL.

### getFunction

```java
java.util.List< Function > com.datalogics.PDFL.AxialShadingPattern.getFunction()
```

**Returns:** [`java.util.List< Function >`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Function.md)

One 1-in n-out function, or an array of n 1-in 1-out functions that determine the values of the color channels, where n is the number of color components in the shading's color space. The functions are called with a parametric variable t which varies across the Domain.

### getPDFObject

```java
PDFObject com.datalogics.PDFL.Pattern.getPDFObject()
```

**Returns:** [`PDFObject`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/PDFObject.md)

### setAntiAlias

```java
void com.datalogics.PDFL.ShadingPattern.setAntiAlias(boolean antiAlias)
```

**Parameters**

- `antiAlias` (`boolean`)

**Returns:** `void`

A flag indicating whether to filter the shading function to prevent aliasing artifacts.

### setBackgroundColor

```java
void com.datalogics.PDFL.ShadingPattern.setBackgroundColor(Color color)
```

**Parameters**

- `color` ([`Color`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Color.md))

**Returns:** `void`

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.

### setBoundingBox

```java
void com.datalogics.PDFL.ShadingPattern.setBoundingBox(Rect boundingBox)
```

**Parameters**

- `boundingBox` ([`Rect`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Rect.md))

**Returns:** `void`

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.

### setColorSpace

```java
void com.datalogics.PDFL.ShadingPattern.setColorSpace(ColorSpace colorSpace)
```

**Parameters**

- `colorSpace` ([`ColorSpace`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/ColorSpace.md))

**Returns:** `void`

The color space of a shading pattern. This space is restricted to be any space except a Pattern space.

### setCoords

```java
void com.datalogics.PDFL.AxialShadingPattern.setCoords(java.util.List< Point > coords)
```

**Parameters**

- `coords` ([`java.util.List< Point >`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Point.md))

**Returns:** `void`

The coordinates of the two endpoints of the axial shading.

### setDomain

```java
void com.datalogics.PDFL.AxialShadingPattern.setDomain(java.util.List< Double > domain)
```

**Parameters**

- `domain` (`java.util.List< Double >`)

**Returns:** `void`

A array of two numbers that specify the limiting values of the parametric variable t. This variable t varies linearly between these two values as a the gradient varies between the starting and ending points of the axis.

Defaults value: [0, 1]. May be NULL.

### setExtend

```java
void com.datalogics.PDFL.AxialShadingPattern.setExtend(java.util.List< Boolean > extend)
```

**Parameters**

- `extend` (`java.util.List< Boolean >`)

**Returns:** `void`

An array of two boolean values indicating whether to extend the shading beyond the starting and ending points of the axis, respectively.

Default value: [false, false]. May be NULL.

### setFunction

```java
void com.datalogics.PDFL.AxialShadingPattern.setFunction(java.util.List< Function > function)
```

**Parameters**

- `function` ([`java.util.List< Function >`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/Function.md))

**Returns:** `void`

One 1-in n-out function, or an array of n 1-in 1-out functions that determine the values of the color channels, where n is the number of color components in the shading's color space. The functions are called with a parametric variable t which varies across the Domain.

### toString

```java
String com.datalogics.PDFL.AxialShadingPattern.toString()
```

**Returns:** `String`

Return a string representation of the AxialShadingPattern.
