#include "ltwrappr.h"
virtual L_INT LPaintEffect::EffectBlt(nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, uEffect, nSpeed, nCycles, uPass, uMaxPass, uROP=SRCCOPY)
L_INT nXDest; |
X coordinate of the origin of the destination rectangle |
L_INT nYDest; |
Y coordinate of the origin of the destination rectangle |
L_INT nWidth; |
width of the destination rectangle |
L_INT nHeight; |
height of the destination rectangle |
HDC hdcSrc; |
handle to the source device context |
L_INT nXSrc; |
x coordinate of the origin of the source rectangle |
L_INT nYSrc; |
y coordinate of the origin of the source rectangle |
L_UINT uEffect; |
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 |
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.
Parameter |
Description |
nXDest |
X coordinate of the origin of the destination rectangle. |
nYDest |
Y coordinate of the origin of the destination rectangle. |
nWidth |
Width of the destination rectangle. |
nHeight |
Height of the destination rectangle. |
hdcSrc |
Handle to the source device context. |
nXSrc |
X coordinate of the origin of the source rectangle. |
nYSrc |
Y coordinate of the origin of the source rectangle. |
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. |
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.
Required DLLs and Libraries
LTDIS For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
Functions: |
|
Topics: |
|
|
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;
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET