LBitmapBase::CopyRect

#include "ltwrappr.h"

virtual L_INT LBitmapBase::CopyRect(LBitmapSrc, nCol, nRow, uWidth, uHeight)

virtual L_INT LBitmapBase::CopyRect(LBitmapSrc, rect)

Copies a rectangle from the source class object's bitmap.

Parameters

LBitmapBase& LBitmapSrc

The source class object from which to copy the bitmap rectangle.

L_INT nCol

The first column of the source rectangle.

L_INT nRow

The first row of the source rectangle.

L_UINT uWidth

The width of the rectangle to copy.

L_UINT uHeight

The height of the rectangle to copy.

RECT& rect

The rectangle to be copied.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

Call this function to copy a rectangle from the source class object's bitmap.

Call this function to copy a bitmap rectangle from the source object and create a new bitmap in the calling object.

Notes:

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

This is an example for LBitmapBase::CopyRect(LBitmapSrc, nCol, nRow, uWidth, uHeight):

L_INT LBitmapBase__CopyRectExample() 
{ 
   L_INT nRet; 
   LBitmapBase MyBitmap, Bitmap2; 
 
   MyBitmap.SetFileName(MAKE_IMAGE_PATH(TEXT("image1.cmp"))); 
   nRet =MyBitmap.Load(); 
   if(nRet !=SUCCESS) 
      return nRet; 
 
   nRet =Bitmap2.CopyRect(MyBitmap,0,0, MyBitmap.GetWidth()/2, MyBitmap.GetHeight()/2); 
   if(nRet !=SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
} 

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help