#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. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
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 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: |
LBitmapBase::Copy, LBitmapBase::CopyData, LBitmapBase::CopyHandle, Class Members |
Topics: |
|
|
|
|
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;
}
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