|Date:||Mon, 24 Nov 2003 15:48:57 -0500|
Hey all, I've been trying to do some "pretty" winform controls and I revisited the gradient problem, I came across a simple algo that seems to do the proper gradient calculations, I tested it on .NET and using the manual calculation ended up with the same line for line gradient as using LinearGradientBrush from System.Drawing.Drawing2D.
I took a look at LinearGradientBrush.cs and I'm not quite sure where to fit it in so I thought I would post it here and get any feedback, perhaps this isn't useful but hopefully it is. I don't know much about the angle parameter that exists in the .NET implementation but when I use this for vertical or horizontal mode, it works fine, I'm not sure whats needed to account for angles etc.
At the very least it draws a gradient in pnet now! ;)
I hope this is helpful.
Description: Text document
|[Prev in Thread]||Current Thread||[Next in Thread]|