Crops the class object's bitmap, resulting in a new bitmap that is the size of the specified rectangle. If a region is defined for the bitmap, the region is also cropped if necessary.
virtual L_INT LBitmapBase::Trim(nCol, nRow, uWidth, uHeight)
virtual L_INT LBitmapBase::Trim(prcTrim)
The X coordinate of the pixel within the bitmap that is the origin of the rectangle to keep.
The Y coordinate of the pixel within the bitmap that is the origin of the rectangle to keep.
Width of the rectangle to keep (in pixels).
Height of the rectangle to keep (in pixels).
Pointer to a RECT structure that contains information about the rectangle to keep.
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
Use this function instead of LBitmapBase::CopyRect when the original bitmap is not needed after cropping.
This function uses bitmap coordinates to specify the area to be copied. Therefore, you must account for the view perspective of the bitmap. For information about bitmap coordinates, refer to Accounting for View Perspective.
This is an example for LBitmapBase::Trim(nCol,
nRow, uWidth, uHeight):
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries