LBitmapBase::CopyRect

#include "ltwrappr.h"

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

virtual L_INT LBitmapBase::CopyRect(LBitmapSrc, rect)

LBitmapBase& LBitmapSrc;

the source class object

L_INT nCol;

the first column

L_INT nRow;

the first row

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

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

Parameter

Description

LBitmapSrc

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

nCol

The first column of the source rectangle.

nRow

The first row of the source rectangle.

uWidth

The width of the rectangle to copy.

uHeight

The height of the rectangle to copy.

rect

The rectangle to be copied.

Returns

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.

Note:

The LBitmapSrc parameter is passed by reference, and is a required parameter.

Note:

The rect parameter is passed by reference, and is a required parameter.

Required DLLs and Libraries

LTDIS
LTFIL

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

Platforms

Win32, x64.

See Also

Functions:

LBitmapBase::Copy, LBitmapBase::CopyData, LBitmapBase::CopyHandle, Class Members

Topics:

Raster Image Functions: Copying Images

 

Raster Image Functions: Palettes

 

Raster Image Functions: Using the Clipboard

Example

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

#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName 
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 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C++ Class Library Help