GradientPatternFillRectangle(Graphics,Rectangle,SpecialEffectsPatternStyle,Color,Color) Method

Summary

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

Syntax

C#
VB
C++
  
Public Overloads Sub GradientPatternFillRectangle( _ 
   ByVal graphics As Graphics, _ 
   ByVal destRect As Rectangle, _ 
   ByVal patternStyle As SpecialEffectsPatternStyle, _ 
   ByVal backColor As Color, _ 
   ByVal foreColor As Color _ 
)  

public void GradientPatternFillRectangle( 
   Graphics graphics, 
   Rectangle destRect, 
   SpecialEffectsPatternStyle patternStyle, 
   Color backColor, 
   Color foreColor 
) 

public: 
void GradientPatternFillRectangle(  
   Graphics^ graphics, 
   Rectangle destRect, 
   SpecialEffectsPatternStyle patternStyle, 
   Color backColor, 
   Color foreColor 
)  

Parameters

graphics
The destination Graphics object

destRect
Rectangle to be used as the display destination rectangle.

patternStyle
Filling style. For possible values refer to SpecialEffectsPatternStyle.

backColor
Value that specifies the background color.

foreColor
Value that specifies the foreground color.

Remarks

For general information, Implementing Special Effects.

Example

This example shows the minimum requirements for using the GradientPatternFillRectangle(Graphics,Rectangle,SpecialEffectsPatternStyle,Color,Color) method to draw and fill a rectangle with a pattern and color.

C#
VB
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.SpecialEffects; 
using Leadtools.Drawing; 
 
public void GradientPatternFillRectangle(Graphics g, Rectangle destRect) 
{ 
   SpecialEffectsProcessor processor = new SpecialEffectsProcessor(); 
   processor.GradientPatternFillRectangle(g, 
                                          destRect, 
                                          SpecialEffectsPatternStyle.DiagonalCross, 
                                          Color.Black, 
                                          Color.Blue); 
} 

Imports Leadtools 
Imports Leadtools.Codecs 
Imports Leadtools.SpecialEffects 
Imports Leadtools.Drawing 
 
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 

Requirements

Target Platforms

Help Version 20.0.2018.6.20
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.SpecialEffects Assembly