Leadtools.SpecialEffects Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.8.31
GradientPatternFillRectangle Method
See Also  Example
Leadtools.SpecialEffects Namespace > SpecialEffectsProcessor Class : GradientPatternFillRectangle Method




Draws a rectangle onto the target device context, and then fills the rectangle with the specified pattern and color.

Overload List

Overload Description
GradientPatternFillRectangle(Graphics,Rectangle,SpecialEffectsPatternStyle,Color,Color) Draws a rectangle onto the target device context, and then fills the rectangle with the specified pattern and color.  
GradientPatternFillRectangle(IntPtr,Rectangle,SpecialEffectsPatternStyle,Color,Color) Draws a rectangle onto the target device context, and then fills the rectangle with the specified pattern and color.  

Example

This example shows the minimum requirements for using the GradientPatternFillRectangle method to draw and fill a rectangle with a pattern and color.

Visual Basic Copy Code
Public Sub GradientPatternFillRectangle(ByVal g As Graphics, ByVal destRect As Rectangle)
   Dim processor As SpecialEffectsProcessor = New SpecialEffectsProcessor()
   processor.GradientPatternFillRectangle(g, destRect, SpecialEffectsPatternStyle.DiagonalCross, Color.Black, Color.Blue)
End Sub
C# Copy Code
public void GradientPatternFillRectangle(Graphics g, Rectangle destRect) 

   SpecialEffectsProcessor processor = new SpecialEffectsProcessor(); 
   processor.GradientPatternFillRectangle(g, 
                                          destRect, 
                                          SpecialEffectsPatternStyle.DiagonalCross, 
                                          Color.Black, 
                                          Color.Blue); 
}

Remarks

For general information, Implementing Special Effects.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also