virtual L_INT LPaintEffect::PaintBitmap(uEffect, nSpeed, nCycles, uPass, uMaxPass, uROP3=SRCCOPY)
Applies an effect when painting the class object's associated bitmap to the class object's associated device context. The effect, commonly used for slide show transitions, specifies how the image is painted, not how it looks when painting is finished.
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.
The Windows ROP code that determines how the destination rectangle is updated. 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. |
To update a status bar or detect a user interrupt during execution of this function, refer to LBase::StatusCallback.
Use LPaintEffect::SetEffectParameters to control the properties of the paint effect.
If the uEffect parameter is from the Twirl class, Wave 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 uPass and uMaxPass parameters have no effect.
The nSpeed and nCycles parameters have effect only if the uEffect parameter is from the Wave class.
Win32, x64.
L_INT LPaintEffect__PaintBitmapExample(LBitmapBase& LeadBitmap,HDC hDC)
{
L_INT nRet;
LPaintEffect LeadPaintEffect;
EFFECTDLGPARAMS EfxDlgParm;
LeadPaintEffect.SetBitmap(&LeadBitmap) ;
LeadPaintEffect.SetDC(hDC) ;
LeadPaintEffect.GetEffectParameters(&EfxDlgParm) ;
EfxDlgParm.uGrain = 5;
EfxDlgParm.bTransparent = TRUE;
EfxDlgParm.crTransparent = RGB(10,0,255);
nRet = LeadPaintEffect.SetEffectParameters(&EfxDlgParm) ;
if(nRet != SUCCESS)
return nRet;
nRet = LeadPaintEffect.PaintBitmap(EFX_EFFECT_WIPE4_L_R_T_B, 0,0, 1,3) ;
if(nRet != SUCCESS)
return nRet;
nRet = LeadPaintEffect.PaintBitmap(EFX_EFFECT_WIPE_RECTANGLE_IN, 0,0, 2,3) ;
if(nRet != SUCCESS)
return nRet;
nRet = LeadPaintEffect.PaintBitmap(EFX_EFFECT_WIPE_RECTANGLE_OUT, 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