diff --git a/Linear-Gradient.md b/Linear-Gradient.md index 30404ce..7bd7516 100644 --- a/Linear-Gradient.md +++ b/Linear-Gradient.md @@ -1 +1,20 @@ -TODO \ No newline at end of file +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! + + + +you could use this code +```C# +GradientStop[] gradientStops = +{ + new GradientStop(0f, Color.Blue), + new GradientStop(1f, Color.Red) +}; +LinearGradient blueToRedGradient = new LinearGradient(gradientStops); +``` \ No newline at end of file