# OdfGradientPattern

Immutable native gradient colors, angle, border, intensities and center.

Class 

`OfficeIMO.OpenDocument`

**Namespace**

`OfficeIMO.OpenDocument`

**Assembly**

`OfficeIMO.OpenDocument`

**Source revision**

`15caddadea70` with working tree changes

**Source**

[OdfGradientPattern.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfGradientPattern.cs#L23)

**Modifiers**

sealed

Immutable native gradient colors, angle, border, intensities and center.

## Inheritance

- object
- OdfGradientPattern

## Remarks

Fractions use one for 100%. The model retains all six styles; drawing projection has a narrower, reported profile.

## Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Property [OdfGradient.Pattern](/api/open-document/officeimo-opendocument-odfgradient/#property-pattern)

### Accepted by parameters 1

- Method [OdfStyleRepository.CreateGradient](/api/open-document/officeimo-opendocument-odfstylerepository/#method-creategradient-string-officeimo-opendocument-odfgradientpattern) parameter `pattern`

Filter members 

Show inherited

## Constructors

`public OdfGradientPattern(OdfGradientStyle style, OdfColor startColor, OdfColor endColor, double angleDegrees = 0, double border = 0, double startIntensity = 1, double endIntensity = 1, double centerX = 0.5, double centerY = 0.5)` [#](#constructor-ctor-officeimo-opendocument-odfgradientstyle-officeimo-opendocument-odfcolor-officeimo-opendocument-odfcolor-double-double-double-double-double-double)

[OdfGradientPattern.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfGradientPattern.cs#L23)

Creates a two-color gradient. Centers may lie outside the filled area.

Parameters

**style OfficeIMO.OpenDocument.OdfGradientStyle required**

**startColor OfficeIMO.OpenDocument.OdfColor required**

**endColor OfficeIMO.OpenDocument.OdfColor required**

**angleDegrees double = 0 optional**

**border double = 0 optional**

**startIntensity double = 1 optional**

**endIntensity double = 1 optional**

**centerX double = 0.5 optional**

**centerY double = 0.5 optional**

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public OdfGradientStyle Style { get; }` [#](#property-style)

[OdfGradientPattern.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfGradientPattern.cs#L34)

Native interpolation style.

`public OdfColor StartColor { get; }` [#](#property-startcolor)

[OdfGradientPattern.cs:36](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfGradientPattern.cs#L36)

Declared start color before intensity adjustment.

`public OdfColor EndColor { get; }` [#](#property-endcolor)

[OdfGradientPattern.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfGradientPattern.cs#L38)

Declared end color before intensity adjustment.

`public double AngleDegrees { get; }` [#](#property-angledegrees)

[OdfGradientPattern.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfGradientPattern.cs#L40)

Clockwise angle from vertical in degrees, ignored for radial gradients.

`public double Border { get; }` [#](#property-border)

[OdfGradientPattern.cs:42](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfGradientPattern.cs#L42)

Solid border fraction from zero to one.

`public double StartIntensity { get; }` [#](#property-startintensity)

[OdfGradientPattern.cs:44](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfGradientPattern.cs#L44)

Start color intensity from zero to one.

`public double EndIntensity { get; }` [#](#property-endintensity)

[OdfGradientPattern.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfGradientPattern.cs#L46)

End color intensity from zero to one.

`public double CenterX { get; }` [#](#property-centerx)

[OdfGradientPattern.cs:48](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfGradientPattern.cs#L48)

Horizontal center as a fraction of the geometry bounds.

`public double CenterY { get; }` [#](#property-centery)

[OdfGradientPattern.cs:50](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfGradientPattern.cs#L50)

Vertical center as a fraction of the geometry bounds.

<!-- PowerForge markdown artifact sha256:699609A77D28F3034CCFD5CDAAE7E9D16EAE34ED83F84B64FA70438AEE2E63DB -->
