LEADTOOLS Special Effects (Leadtools.SpecialEffects assembly)
LEAD Technologies, Inc

GradientFillRectangle(Graphics,Rectangle,SpecialEffectsGradientStyle,Color,Color,Int32) Method

Example 





The destination Graphics object, where the gradient effect will be displayed.
Rectangle to be used as the display destination rectangle.
Gradient style. For possible values refer to SpecialEffectsGradientStyle.
Value that specifies the starting color.
Value that specifies the ending color.
Number of gradient color steps. Valid values are 2 to 256.
Draws a rectangle onto the target device context, and then fills the rectangle with a gradient that begins with the specified starting color and ends with the specified ending color.
Syntax
public void GradientFillRectangle( 
   Graphics g,
   Rectangle destRect,
   SpecialEffectsGradientStyle gradientStyle,
   Color startColor,
   Color endColor,
   int steps
)
'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
)
 function Leadtools.SpecialEffects.SpecialEffectsProcessor.GradientFillRectangle(Graphics,Rectangle,SpecialEffectsGradientStyle,Color,Color,Int32)( 
   g ,
   destRect ,
   gradientStyle ,
   startColor ,
   endColor ,
   steps 
)
public:
void GradientFillRectangle( 
   Graphics^ g,
   Rectangle destRect,
   SpecialEffectsGradientStyle gradientStyle,
   Color startColor,
   Color endColor,
   int steps
) 

Parameters

g
The destination Graphics object, where the gradient effect will be displayed.
destRect
Rectangle to be used as the display destination rectangle.
gradientStyle
Gradient style. For possible values refer to SpecialEffectsGradientStyle.
startColor
Value that specifies the starting color.
endColor
Value that specifies the ending color.
steps
Number of gradient color steps. Valid values are 2 to 256.
Remarks

For more information, refer to Implementing Special Effects.

Example
Copy CodeCopy Code  
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
public void GradientFillRectangle(Graphics g, Rectangle destRect)
{
   SpecialEffectsProcessor processor = new SpecialEffectsProcessor();
   processor.GradientFillRectangle(g, destRect, SpecialEffectsGradientStyle.EllipseToC, Color.Red, Color.Blue, 12);
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

SpecialEffectsProcessor Class
SpecialEffectsProcessor Members
Overload List

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.