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.
The bounding rectangle.
Filling style used during transition. For valid values, refer to Effect Transition Filling Styles.
Effect to apply when painting. For valid values, refer to Effect Types.
Speed of the wave. Valid values are 1 to 256. This parameter is valid only if the uEffect parameter is from the Wave class.
Number of cycles or repetitions used to draw the wave. This parameter is valid only if the uEffect parameter is from the Wave class.
Pass number when using a pattern brush. Use 1 for painting in one pass.
Maximum passes for a pattern brush. Use 1 for painting in one pass.
Windows ROP code for display. This parameter takes the same codes as the Windows BitBlt function. For ordinary painting, use SRCCOPY.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
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.
Win32, x64.
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 Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document