VectSharp 2.6.1
A light library for C# vector graphics
Loading...
Searching...
No Matches
VectSharp.GradientStops Class Reference

Represents a read-only list of GradientStops. More...

Inheritance diagram for VectSharp.GradientStops:

Public Member Functions

IEnumerator< GradientStopGetEnumerator ()
 
 GradientStops (IEnumerable< GradientStop > gradientStops)
 Creates a new GradientStops instance containing the specified gradient stops. More...
 
 GradientStops (params GradientStop[] gradientStops)
 Creates a new GradientStops instance containing the specified gradient stops. More...
 
Colour GetColourAt (double position)
 Gets the colour at a certain position on the gradient. More...
 

Static Public Member Functions

static implicit operator Func< double, Colour > (GradientStops stops)
 Convert a GradientStops object to a function that assigns a colour to values between 0 and 1. More...
 

Static Public Attributes

static readonly double StopTolerance = 1e-7
 The minimum distance that is enforced between consecutive gradient stops. More...
 

Properties

GradientStop this[int index] [get]
 
int Count [get]
 

Detailed Description

Represents a read-only list of GradientStops.

Definition at line 152 of file Brush.cs.

Constructor & Destructor Documentation

◆ GradientStops() [1/2]

VectSharp.GradientStops.GradientStops ( IEnumerable< GradientStop gradientStops)

Creates a new GradientStops instance containing the specified gradient stops.

Parameters
gradientStopsThe gradient stops that will be contained in the GradientStops object.

Definition at line 182 of file Brush.cs.

◆ GradientStops() [2/2]

VectSharp.GradientStops.GradientStops ( params GradientStop[]  gradientStops)

Creates a new GradientStops instance containing the specified gradient stops.

Parameters
gradientStopsThe gradient stops that will be contained in the GradientStops object.

Definition at line 228 of file Brush.cs.

Member Function Documentation

◆ GetColourAt()

Colour VectSharp.GradientStops.GetColourAt ( double  position)

Gets the colour at a certain position on the gradient.

Parameters
positionThe position in the gradient (ranging from 0 to 1).
Returns
The colour of the gradient at the specified position.

Definition at line 238 of file Brush.cs.

◆ GetEnumerator()

IEnumerator< GradientStop > VectSharp.GradientStops.GetEnumerator ( )

Definition at line 168 of file Brush.cs.

◆ operator Func< double, Colour >()

static implicit VectSharp.GradientStops.operator Func< double, Colour > ( GradientStops  stops)
static

Convert a GradientStops object to a function that assigns a colour to values between 0 and 1.

Parameters
stopsThe GradientStops to convert.

Member Data Documentation

◆ StopTolerance

readonly double VectSharp.GradientStops.StopTolerance = 1e-7
static

The minimum distance that is enforced between consecutive gradient stops.

Definition at line 157 of file Brush.cs.

Property Documentation

◆ Count

int VectSharp.GradientStops.Count
get

Definition at line 163 of file Brush.cs.

◆ this[int index]

GradientStop VectSharp.GradientStops.this[int index]
get

Definition at line 160 of file Brush.cs.


The documentation for this class was generated from the following file: