LPaintEffect::PaintBitmap

#include "ltwrappr.h"

virtual L_INT LPaintEffect::PaintBitmap(uEffect, nSpeed, nCycles , uPass, uMaxPass, uROP3=SRCCOPY)

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 uROP3;

/* Windows ROP code for display */

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.

Parameter

Description

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.

uROP3

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.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

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.

Required DLLs and Libraries

LTDIS
LTEFX

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

Class Members

Topics:

Implementing Special Effects

 

Effect Types

Example

L_VOID TestEfxFunction(LBitmapBase& LeadBitmap,HDC hDC)
{
   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);

   LeadPaintEffect.SetEffectParameters(&EfxDlgParm) ;
   
   LeadPaintEffect.PaintBitmap(EFX_EFFECT_WIPE4_L_R_T_B, 0,0,  1,3) ;
   LeadPaintEffect.PaintBitmap(EFX_EFFECT_WIPE_RECTANGLE_IN, 0,0, 2,3) ;
   LeadPaintEffect.PaintBitmap(EFX_EFFECT_WIPE_RECTANGLE_OUT, 0,0, 3,3) ;

   LeadPaintEffect.SetDC(0) ;
}