Creates or updates the region of the class object's associated bitmap by adding a curved region.
#include "ltwrappr.h"
virtual L_INT LBitmapRgn::SetRgnCurve(pCurve)
Pointer to the CURVE structure that specifies the curve region. The structure is specified using device context coordinates, and LEADTOOLS translates the coordinates using the values specified in the LBitmapRgn::SetRgnXForm parameter.
| Value | Meaning |
|---|---|
| SUCCESS | The function was successful. |
| < 1 | An error occurred. Refer to Return Codes. |
To update an existing region, use the LBitmapRgn::SetRgnCombineMode function to specify how the new region is to be combined with the existing one. For descriptions of the possibilities, refer to Creating a Bitmap Region.
Win32, x64.
L_INT LBitmapRgn__SetRgnCurveExample(LBitmap & Bitmap){L_INT nRet;CURVE curve;POINT pt[5];L_INT nWidth = Bitmap.GetWidth();L_INT nHeight = Bitmap.GetHeight();LBitmapRgn Region;pt[0].x = nWidth / 4;pt[0].y = nHeight / 4;pt[1].x = nWidth / 4;pt[1].y = 3 * nHeight / 4;pt[2].x = 3 * nWidth / 4;pt[2].y = 3 * nHeight / 4;pt[3].x = nWidth / 2;pt[3].y = nHeight / 2;pt[4].x = 3 * nWidth / 4;pt[4].y = nHeight / 4;curve.uStructSize=sizeof(CURVE);curve.nType = CURVE_STANDARD;curve.nPointCount = sizeof(pt) / sizeof(pt[0]);curve.pPoints = pt;curve.uFillMode = L_POLY_WINDING;curve.dTension = 0.5;curve.nClose = CURVE_CLOSE;curve.nReserved = 0;Region.SetBitmap(&Bitmap);nRet =Region.SetRgnCurve(&curve);if(nRet !=SUCCESS)return nRet;nRet =Bitmap.Invert();if(nRet !=SUCCESS)return nRet;nRet =Region.Free();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
