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)

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

Parameters

LPRECT pRect

The bounding rectangle.

L_UINT uTransition

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

L_UINT uEffect

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

L_INT 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.

L_INT 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.

L_UINT uPass

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

L_UINT uMaxPass

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

L_UINT32 uROP

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

Returns

Value Meaning
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

Platforms

Win32, x64.

See Also

Functions

Topics

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; 
} 
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.