New to Telerik Document ProcessingStart a free 30-day trial

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:

C#
public abstract class Gradient : PatternColor, IEquatable<ColorBase>

Inheritance: objectColorBasePatternColorGradient

Derived Classes: LinearGradientRadialGradient

Implements: IEquatable<ColorBase>

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

Constructors

Creates a gradient with explicit placement transform.

C#
public Gradient(Point startPoint, Point endPoint, IPosition position)
Parameters:startPointPoint

The starting point of the gradient.

endPointPoint

The ending point of the gradient.

positionIPosition

The position transformation matrix for the gradient.

Creates a gradient defined by start and end points.

C#
public Gradient(Point startPoint, Point endPoint)
Parameters:startPointPoint

The starting point of the gradient.

endPointPoint

The ending point of the gradient.

Methods

Equals the specified other.

C#
public override bool Equals(ColorBase other)
Parameters:otherColorBase

The other.

Returns:

bool

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

Overrides: ColorBase.Equals(ColorBase)

Properties

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

C#
public ColorBase Background { get; set; }
Property Value:

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

Gets or sets the ending point that anchors the gradient.

C#
public Point EndPoint { get; set; }
Property Value:

The ending point of the gradient.

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

C#
public bool ExtendAfter { get; set; }
Property Value:

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

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

C#
public bool ExtendBefore { get; set; }
Property Value:

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

Gets the ordered stops that define the color interpolation.

C#
public GradientStopCollection GradientStops { get; }
Property Value:

The gradient stops collection.

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

C#
public override IPosition Position { get; set; }
Property Value:

The position transformation matrix.

Overrides: PatternColor.Position

Gets or sets the starting point that anchors the gradient.

C#
public Point StartPoint { get; set; }
Property Value:

The starting point of the gradient.