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




Draws a rectangle onto the target device context with the specified fill pattern and color while using a special effect.

Overload List

Overload Description
PaintTransition(Graphics,SpecialEffectsTransitionStyle,Color,Color,Int32,Rectangle,SpecialEffectsType,Int32,Int32,Int32,Int32,Int32,Int32,Boolean,Color,Int32,Color,Int32,SpecialEffectsProgress) Draws a rectangle onto the target device context with the specified fill pattern and color while using a special effect.  
PaintTransition(IntPtr,SpecialEffectsTransitionStyle,Color,Color,Int32,Rectangle,SpecialEffectsType,Int32,Int32,Int32,Int32,Int32,Int32,Boolean,Color,Int32,Color,Int32,SpecialEffectsProgress) Draws a rectangle onto the target device context with the specified fill pattern and color while using a special effect.  

Example

This example shows the minimum requirements for using PaintTransition method.

Visual Basic Copy Code
Public Sub PaintTransition(ByVal g As Graphics, ByVal destRect As Rectangle)
   Dim processor As SpecialEffectsProcessor = New SpecialEffectsProcessor()
   processor.PaintTransition(g, SpecialEffectsTransitionStyle.LineRToL, Color.Red, Color.Blue, 12, destRect, SpecialEffectsType.WipeRectangleIn, 4, 10, 0, 0, 1, 3, False, Color.Empty, 0, Color.Black, RasterPaintProperties.SourceCopy, Nothing)
End Sub
C# Copy Code
public void PaintTransition(Graphics g, Rectangle destRect) 

   SpecialEffectsProcessor processor = new SpecialEffectsProcessor(); 
   processor.PaintTransition(g, 
                              SpecialEffectsTransitionStyle.LineRToL, 
                              Color.Red, /* background color, red */ 
                              Color.Blue, /* foreground color, blue */ 
                              12,                /* gradient color steps */ 
                              destRect, /* destination rectangle */ 
                              SpecialEffectsType.WipeRectangleIn, /* effect to apply when painting the transition */ 
                              4, /* graining size */ 
                              10, /* delay between graining steps */ 
                              0, /* speed of the wave */ 
                              0, /* number of cycles or repetitions */ 
                              1, /* step number for the pattern brush */ 
                              3, /* maximum steps for the pattern brush */ 
                              false, /* do not use transparency */ 
                              Color.Empty, /* no transparent color */ 
                              0, /* wand width */ 
                              Color.Black, /* no wand color */ 
                              RasterPaintProperties.SourceCopy, 
                              null); 
}

Remarks

Use this method to create a special effect screen transition before painting the next image.

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 .

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