mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2025-12-13 00:58:31 +00:00
Added some content
parent
2091d57043
commit
97fd59dedc
@ -1 +1,20 @@
|
||||
TODO
|
||||
The linear gradient is one of the default gradients provided by CUE.NET.
|
||||
It's based on a set of _GradientStops_. All values are calculated as interpolation between the two _GradientStops_ surrounding the requested point.
|
||||
|
||||
Using the linear gradient is quite easy. Just create a new instance of the _LinearGradient_-class and use an array of _GradientStops_ as constructor-parameter.
|
||||
|
||||
If you want to create a gradient to draw something like this.
|
||||
> The gradient is the adopted line from the bottom left to the top right corner represented by the white line in the image.
|
||||
> Note that this direction-info is **not** included in the gradient!
|
||||
|
||||
<img src="https://upload.wikimedia.org/wikipedia/commons/2/27/Gradient.svg" width="128" height="128">
|
||||
|
||||
you could use this code
|
||||
```C#
|
||||
GradientStop[] gradientStops =
|
||||
{
|
||||
new GradientStop(0f, Color.Blue),
|
||||
new GradientStop(1f, Color.Red)
|
||||
};
|
||||
LinearGradient blueToRedGradient = new LinearGradient(gradientStops);
|
||||
```
|
||||
Loading…
x
Reference in New Issue
Block a user