LPaintEffect::PaintBitmap

Summary

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.

Syntax

#include "ltwrappr.h"

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

Parameters

L_UINT uEffect

Effect to apply when painting. For valid values, refer to Effect Types.

L_INT 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.

L_INT 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.

L_UINT uPass

Pass number when using a pattern brush. Use 1 for painting in one pass.

L_UINT uMaxPass

Maximum passes for a pattern brush. Use 1 for painting in one pass.

L_UINT32 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

Value Meaning
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

Platforms

Win32, x64.

See Also

Functions

Topics

Example

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 Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.