LPaintEffect::PaintTransition

#include "ltwrappr.h"

virtual L_INT LPaintEffect::PaintTransition(pRect, uTransition, uEffect=EFX_EFFECT_WIPE_L_TO_R, nSpeed = 0, nCycles = 0, uPass=1, uMaxPass=1, uROP=SRCCOPY)

LPRECT pRect;

/* the bounding rectangle */

L_UINT uTransition;

/* the filling style */

L_UINT uEffect;

/* the effect to apply when painting */

L_INT nSpeed;

/* speed of the wave */

L_INT nCycles;

/* number of cycles or repetitions */

L_UINT uPass;

/* pass number when using a pattern brush */

L_UINT uMaxPass;

/* maximum passes for a pattern brush */

L_UINT32 uROP;

/* windows ROP code for display */

Draws a rectangle into the associated device context with the specified fill pattern while using a special effect.

Parameter

Description

pRect

The bounding rectangle.

uTransition

Filling style used during transition. For valid values, refer to Effect Transition Filling Styles.

uEffect

Effect to apply when painting. For valid values, refer to Effect Types.

nSpeed

Speed of the wave. Valid values are 1 to 256. This parameter is valid only if the uEffect parameter is from the Wave class.

nCycles

Number of cycles or repetitions used to draw the wave. This parameter is valid only if the uEffect parameter is from the Wave class.

uPass

Pass number when using a pattern brush. Use 1 for painting in one pass.

uMaxPass

Maximum passes for a pattern brush. Use 1 for painting in one pass.

uROP

Windows ROP code for display. This parameter takes the same codes as the Windows BitBlt function. For ordinary painting, use SRCCOPY.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

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

Use LPaintEffect::SetTransitionParameters to control the properties of the transition.

Required DLLs and Libraries

LTDIS
LTEFX

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Win32, x64.

See Also

Functions:

Class Members

Topics:

Implementing Special Effects

 

Effect Types

Example

L_INT LPaintEffect__PaintTransitionExample(LBitmapBase& LeadBitmap,HDC hDC)
{
   L_INT nRet;
   LPaintEffect LeadPaintEffect;
   TRANSITIONDLGPARAMS TransDlgParm;
   RECT Rect;
   LeadPaintEffect.SetBitmap(&LeadBitmap) ;
   LeadPaintEffect.SetDC(hDC) ;
   LeadPaintEffect.GetTransitionParameters(&TransDlgParm) ;
   TransDlgParm.uGrain = 5;
   TransDlgParm.uDelay = 10;
   TransDlgParm.bTransparent = TRUE;
   TransDlgParm.crTransparent = RGB(10,0,255);
   nRet = LeadPaintEffect.SetTransitionParameters(&TransDlgParm) ;
   if(nRet != SUCCESS)
      return nRet;
   Rect.left = 50 ;
   Rect.top = 50 ;
   Rect.right = 200 ;
   Rect.bottom = 200 ;
   nRet = LeadPaintEffect.PaintTransition(&Rect,EFX_TRANS_GRADIENT_LINE_T_TO_B,
      EFX_EFFECT_WIPE_RECTANGLE_IN, 0,0, 1,3);
   if(nRet != SUCCESS)
      return nRet;
   nRet = LeadPaintEffect.PaintTransition(&Rect,EFX_TRANS_GRADIENT_LINE_T_TO_B,
      EFX_EFFECT_WIPE_RECTANGLE_OUT, 0,0,2,3);
   if(nRet != SUCCESS)
      return nRet;
   nRet = LeadPaintEffect.PaintTransition(&Rect,EFX_TRANS_GRADIENT_LINE_T_TO_B,
      EFX_EFFECT_WIPE_RECTANGLE_IN, 0,0,3,3);
   if(nRet != SUCCESS)
      return nRet;
   LeadPaintEffect.SetDC(0) ;
   return SUCCESS;
}