Does anyone know if the equivalent SVG attribute "gradientUnits = userSpaceOnUse" exists in WPF for LinearGradientBrush? I can't seem to find it.
If not, does anyone know how to calculate it (C # or VB.NET)? For example, if I have StartPoint 0,0 and EndPoint 1,1 on a rectangle that is 100x100, the angle is 45 degrees. However, when I change the width or height of the rectangle, for example Width = 150, the axis is no longer equal to 45 degrees. How could I calculate that the 45 degree angle is in a rectangle that is not a square, so it works from the lower left corner to the upper right corner for the middle gradient stop.
source
share