Class
Gradient

Base for gradient pattern colors that interpolate between multiple stops; use to fill areas with linear or radial color transitions.

Definition

Namespace:Telerik.Windows.Documents.Fixed.Model.ColorSpaces

Assembly:Telerik.Windows.Documents.Fixed.dll

Syntax:

cs-api-definition
public abstract class Gradient : PatternColor, IEquatable<ColorBase>

Inheritance: objectColorBasePatternColorGradient

Derived Classes: LinearGradientRadialGradient

Implements: IEquatable<ColorBase>

Inherited Members ColorBase.Equals(object)ColorBase.GetHashCode()

Constructors

Gradient(Point, Point)

Creates a gradient defined by start and end points.

Declaration

cs-api-definition
public Gradient(Point startPoint, Point endPoint)

Parameters

startPoint

Point

The starting point of the gradient.

endPoint

Point

The ending point of the gradient.

Gradient(Point, Point, IPosition)

Creates a gradient with explicit placement transform.

Declaration

cs-api-definition
public Gradient(Point startPoint, Point endPoint, IPosition position)

Parameters

startPoint

Point

The starting point of the gradient.

endPoint

Point

The ending point of the gradient.

position

IPosition

The position transformation matrix for the gradient.

Properties

Background

Gets or sets the background color used outside the gradient ramp when extension is disabled.

Declaration

cs-api-definition
public ColorBase Background { get; set; }

Property Value

ColorBase

The background color, or null if no background color is specified.

EndPoint

Gets or sets the ending point that anchors the gradient.

Declaration

cs-api-definition
public Point EndPoint { get; set; }

Property Value

Point

The ending point of the gradient.

ExtendAfter

Gets or sets whether the gradient extends beyond the end point.

Declaration

cs-api-definition
public bool ExtendAfter { get; set; }

Property Value

bool

True if the gradient extends after the end point; otherwise, false.

ExtendBefore

Gets or sets whether the gradient extends beyond the start point.

Declaration

cs-api-definition
public bool ExtendBefore { get; set; }

Property Value

bool

True if the gradient extends before the start point; otherwise, false.

GradientStops

Gets the ordered stops that define the color interpolation.

Declaration

cs-api-definition
public GradientStopCollection GradientStops { get; }

Property Value

GradientStopCollection

The gradient stops collection.

Position

Gets or sets the transform that positions the gradient in user space.

Declaration

cs-api-definition
public override IPosition Position { get; set; }

Property Value

IPosition

The position transformation matrix.

Overrides PatternColor.Position

StartPoint

Gets or sets the starting point that anchors the gradient.

Declaration

cs-api-definition
public Point StartPoint { get; set; }

Property Value

Point

The starting point of the gradient.

Methods

Equals(ColorBase)

Equals the specified other.

Declaration

cs-api-definition
public override bool Equals(ColorBase other)

Parameters

other

ColorBase

The other.

Returns

bool

True if the specified gradient is equal to the current gradient; otherwise, false.

Overrides ColorBase.Equals(ColorBase)