Class LinearGradientTexture
Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
Inherited Members
Namespace: RGB.NET.Presets.Textures
Assembly: RGB.NET.Presets.dll
Syntax
public sealed class LinearGradientTexture : AbstractGradientTexture, IBindable, INotifyPropertyChanged, ITexture
Constructors
| Edit this page View SourceLinearGradientTexture(Size, IGradient)
Initializes a new instance of the LinearGradientTexture class.
Declaration
public LinearGradientTexture(Size size, IGradient gradient)
Parameters
| Type | Name | Description |
|---|---|---|
| Size | size | The size of the texture. |
| IGradient | gradient | The RGB.NET.Presets.Gradients.IGradient drawn by this LinearGradientTexture. |
LinearGradientTexture(Size, IGradient, Point, Point)
Initializes a new instance of the LinearGradientTexture class.
Declaration
public LinearGradientTexture(Size size, IGradient gradient, Point startPoint, Point endPoint)
Parameters
| Type | Name | Description |
|---|---|---|
| Size | size | The size of the texture. |
| IGradient | gradient | The RGB.NET.Presets.Gradients.IGradient drawn by this LinearGradientTexture. |
| Point | startPoint | The start Point (as percentage in the range [0..1]). |
| Point | endPoint | The end Point (as percentage in the range [0..1]). |
Properties
| Edit this page View SourceEndPoint
Gets or sets the end Point (as percentage in the range [0..1]) of the IGradient drawn by this LinearGradientTexture. (default: 1.0, 0.5)
Declaration
public Point EndPoint { get; set; }
Property Value
| Type | Description |
|---|---|
| Point |
StartPoint
Gets or sets the start Point (as percentage in the range [0..1]) of the IGradient drawn by this LinearGradientTexture. (default: 0.0, 0.5)
Declaration
public Point StartPoint { get; set; }
Property Value
| Type | Description |
|---|---|
| Point |
Methods
| Edit this page View SourceGetColor(in Point)
Gets the color at the specified location of the texture.
Declaration
protected override Color GetColor(in Point point)
Parameters
| Type | Name | Description |
|---|---|---|
| Point | point | The location to get the color from. |
Returns
| Type | Description |
|---|---|
| Color | The color at the specified location. |