←Select platform

GradientPatternFillRectangle(IntPtr,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#
C++/CLI
Python
public void GradientPatternFillRectangle( 
   IntPtr hdc, 
   Rectangle destRect, 
   SpecialEffectsPatternStyle patternStyle, 
   Color backColor, 
   Color foreColor 
) 
public: 
void GradientPatternFillRectangle(  
   IntPtr hdc, 
   Rectangle destRect, 
   SpecialEffectsPatternStyle patternStyle, 
   Color backColor, 
   Color foreColor 
)  
def GradientPatternFillRectangle(self,hdc,destRect,patternStyle,backColor,foreColor): 

Parameters

hdc
Handle to a device context.

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, refer to 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#
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); 
} 
Requirements

Target Platforms

Help Version 22.0.2023.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.SpecialEffects Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.