Overload | Description |
---|---|
DrawEffect(Graphics,Point,Graphics,Rectangle,SpecialEffectsType,Int32,Int32,Int32,Int32,Int32,Int32,Boolean,Color,Int32,Color,Int32,SpecialEffectsProgress) | Performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context, while applying a special effect. |
DrawEffect(IntPtr,Point,IntPtr,Rectangle,SpecialEffectsType,Int32,Int32,Int32,Int32,Int32,Int32,Boolean,Color,Int32,Color,Int32,SpecialEffectsProgress) | Performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context, while applying a special effect. |
This example shows how to use DrawEffect with wave effect .
Visual Basic | Copy Code |
---|---|
Public Sub DrawEffect(ByVal g As Graphics, ByVal destRect As Rectangle) |
C# | Copy Code |
---|---|
public void DrawEffect(Graphics g, Rectangle destRect) |
Use this method as a replacement for the Windows BitBlt API method when you want a special painting effect.
Use the grain and delay parameters to control the speed of the display. The grain parameter controls the size of the painting increment, and delay controls the time between increments.
The wand is a solid color bar that moves during an effect. Small grain sizes produce the best wand effects. Many of the effects listed in SpecialEffectsType can have a wand.
Use the pass and maxPass parameters to paint the image in more than one pass. For example, if you want a 3-pass paint, use maxPass of 3 and paint 3 times, once with pass = 1, once with pass = 2, and once with pass = 3.
Multipass painting for the PushClass is disabled.
If the effectType parameter is from the Twirl class, White Turnover class, Turnover class, Replace class, Laser class, Fade Normal class, Fade Black and White class, Fade Color class or Wave Class, the pass and maxPass parameters have no effect.
If the effectType parameter is from the Fade Normal class, Fade Black and White class or Fade Color class, the grain parameter has no effect. However, if the effectType parameter is from the Wave class, the grain parameter contains the wave size.
If the effectType parameter is from the White Turnover class, the Turnover class or the Replace class, the wandWidth and wandColor parameters have no effect. However, if the effectType parameter is from the Fade Color class, the wandColor parameter contains the bitmap color level.
The speed and cycles parameters have effect only if the effectType parameter is from the Wave class.
For general information, refer to Implementing Special Effects .
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