◆ GradientBrush()
pluginbase.Helpers.Data.GradientBrush.GradientBrush |
( |
Vector2 |
pt1, |
|
|
Rgba |
col1, |
|
|
Vector2 |
pt2, |
|
|
Rgba |
col2 |
|
) |
| |
23 _coeff1 = _vec.X * _start.X + _vec.Y * _start.Y;
24 _coeff2 = _vec.X * _end.X + _vec.Y * _end.Y;
◆ GetColor()
Rgba pluginbase.Helpers.Data.GradientBrush.GetColor |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
Implements pluginbase.Helpers.Data.IBrush.
29 float c = _vec.X * x + _vec.Y * y;
30 if (c <= _coeff1)
return _startCol;
31 if (c >= _coeff2)
return _endCol;
32 return (_startCol * (_coeff2 - c) + _endCol * (c - _coeff1)) / (_coeff2 - _coeff1);
◆ Default
Rgba pluginbase.Helpers.Data.GradientBrush.Default |
|
get |
The documentation for this class was generated from the following file: