Copies a rectangle from the source class object's bitmap.
#include "ltwrappr.h"
virtual L_INT LBitmapBase::CopyRect(LBitmapSrc, nCol, nRow, uWidth, uHeight)
virtual L_INT LBitmapBase::CopyRect(LBitmapSrc, rect)
The source class object from which to copy the bitmap rectangle.
The first column of the source rectangle.
The first row of the source rectangle.
The width of the rectangle to copy.
The height of the rectangle to copy.
The rectangle to be copied.
Value | Meaning |
---|---|
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.
Notes:
The LBitmapSrc parameter is passed by reference, and is a required parameter.
The rect parameter is passed by reference, and is a required parameter.
Win32, x64.
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 Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document