Performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into the class object's associated device context, while applying a special effect.
#include "ltwrappr.h"
virtual L_INT LPaintEffect::EffectBlt(nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, uEffect, nSpeed, nCycles, uPass, uMaxPass, uROP=SRCCOPY)
X coordinate of the origin of the destination rectangle.
Y coordinate of the origin of the destination rectangle.
Width of the destination rectangle.
Height of the destination rectangle.
Handle to the source device context.
X coordinate of the origin of the source rectangle.
Y coordinate of the origin of the source rectangle.
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 as a replacement for the Windows BitBlt API function when you want a special painting effect.
Use LPaintEffect::SetEffectParameters to control the properties of the paint effect.
If the uEffect 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 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__EffectBltExample(LBitmapBase& LeadBitmap,HDC hDC)
{
L_INT nRet;
LPaintEffect LeadPaintEffect;
EFFECTDLGPARAMS EfxDlgParm;
HDC hdcSrc;
LeadPaintEffect.SetBitmap(&LeadBitmap) ;
LeadPaintEffect.SetDC(hDC) ;
LeadPaintEffect.GetEffectParameters(&EfxDlgParm) ;
EfxDlgParm.uDelay = 10;
EfxDlgParm.bTransparent = TRUE;
EfxDlgParm.crTransparent = RGB(10,0,255);
nRet = LeadPaintEffect.SetEffectParameters(&EfxDlgParm) ;
if(nRet != SUCCESS)
return nRet;
hdcSrc = CreateCompatibleDC(hDC);
// Paint the image using EffectBlt in 3 steps
nRet = LeadPaintEffect.EffectBlt(0,0,LeadBitmap.GetWidth(),LeadBitmap.GetHeight(),hdcSrc,0,0,
EFX_EFFECT_WIPE_L_TO_R, 0, 0, 1,3);
if(nRet != SUCCESS)
return nRet;
nRet = LeadPaintEffect.EffectBlt(0,0,LeadBitmap.GetWidth(),LeadBitmap.GetHeight(),hdcSrc,0,0,
EFX_EFFECT_WIPE_R_TO_L, 0, 0,2,3);
if(nRet != SUCCESS)
return nRet;
nRet = LeadPaintEffect.EffectBlt(0,0,LeadBitmap.GetWidth(),LeadBitmap.GetHeight(),hdcSrc,0,0,
EFX_EFFECT_WIPE_L_TO_R, 0, 0,3,3);
if(nRet != SUCCESS)
return nRet;
LeadPaintEffect.SetDC(0) ;
DeleteDC(hdcSrc);
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