Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.6.2
|
Leadtools.SpecialEffects Namespace > SpecialEffectsProcessor Class > GradientFillRectangle Method : GradientFillRectangle(Graphics,Rectangle,SpecialEffectsGradientStyle,Color,Color,Int32) Method |
'Declaration Public Overloads Sub GradientFillRectangle( _ ByVal g As Graphics, _ ByVal destRect As Rectangle, _ ByVal gradientStyle As SpecialEffectsGradientStyle, _ ByVal startColor As Color, _ ByVal endColor As Color, _ ByVal steps As Integer _ )
'Usage Dim instance As SpecialEffectsProcessor Dim g As Graphics Dim destRect As Rectangle Dim gradientStyle As SpecialEffectsGradientStyle Dim startColor As Color Dim endColor As Color Dim steps As Integer instance.GradientFillRectangle(g, destRect, gradientStyle, startColor, endColor, steps)
public void GradientFillRectangle( Graphics g, Rectangle destRect, SpecialEffectsGradientStyle gradientStyle, Color startColor, Color endColor, int steps )
public: void GradientFillRectangle( Graphics^ g, Rectangle destRect, SpecialEffectsGradientStyle gradientStyle, Color startColor, Color endColor, int steps )
For more information, refer to Implementing Special Effects.
This Example shows the minimum requirements for using the GradientFillRectangle(Graphics,Rectangle,SpecialEffectsGradientStyle,Color,Color,Int32) method to draw and fill a rectangle with a color gradient.
Imports Leadtools Imports Leadtools.Codecs Imports Leadtools.SpecialEffects Imports Leadtools.Drawing Public Sub GradientFillRectangle(ByVal g As Graphics, ByVal destRect As Rectangle) Dim processor As SpecialEffectsProcessor = New SpecialEffectsProcessor() processor.GradientFillRectangle(g, destRect, SpecialEffectsGradientStyle.EllipseToC, Color.Red, Color.Blue, 12) End Sub
using Leadtools; using Leadtools.Codecs; using Leadtools.SpecialEffects; using Leadtools.Drawing; public void GradientFillRectangle(Graphics g, Rectangle destRect) { SpecialEffectsProcessor processor = new SpecialEffectsProcessor(); processor.GradientFillRectangle(g, destRect, SpecialEffectsGradientStyle.EllipseToC, Color.Red, Color.Blue, 12); }