Called every time the best match is found to replace the rectangle.
#include "ltwrappr.h"
virtual L_INT LBitmap::PicturizeCallBack(pCellBitmap, x, y)
The pointer to the bitmap handle referencing the bitmap that will be placed in the position starting at (x, y). Do not delete or change this bitmap in any way.
X coordinate (column) where the new bitmap has been placed.
Y coordinate (row) where the new bitmap has been placed.
| Value | Meaning |
|---|---|
| SUCCESS | The function was successful. |
| < 1 | An error occurred. Refer to Return Codes. |
This callback is called every time the best match is found to replace the rectangle starting at (x, y) in the class object's original bitmap.
Win32, x64.
class LUserBitmap : public LBitmap{HWND m_hWnd;public:LUserBitmap(HWND hwnd);virtual L_INT PicturizeCallBack(pBITMAPHANDLE pCellBitmap,L_INT x,L_INT y);virtual ~LUserBitmap();};//////////////////////////////////////////////////////////////////////// Construction/Destruction////////////////////////////////////////////////////////////////////LUserBitmap::LUserBitmap(HWND hwnd){m_hWnd = hwnd;}LUserBitmap::~LUserBitmap(){}L_INT LUserBitmap::PicturizeCallBack(pBITMAPHANDLE pThumb,L_INT x,L_INT y){LBitmap ThumbBitmap(pThumb);RECT rcDest;HDC hdc = GetDC(m_hWnd);// assume that the original bitmap was viewed at 100% zoom factor.// Also assume that we are painting on a 24BPP display.SetRect(&rcDest, x, y, x + ThumbBitmap.GetWidth(), y + ThumbBitmap.GetHeight());// paint the bitmap at (x,y) coordinatesThumbBitmap.Paint()->SetDC(hdc);ThumbBitmap.SetDstRect(&rcDest);ThumbBitmap.Paint()->PaintDC();ReleaseDC(m_hWnd, hdc);// return an error code if you want to abort the processreturn SUCCESS;}L_INT LBitmap__PicturizeCallBackExample(HWND hWnd){L_INT nRet;LUserBitmap LeadBitmap(hWnd);//Load an imagenRet =LeadBitmap.Load(MAKE_IMAGE_PATH(TEXT("image1.cmp")), 0,ORDER_BGR);if(nRet !=SUCCESS)return nRet;// Call add noise function// during the calling of this function// StatusCallBack will be callednRet =LeadBitmap.Picturize(MAKE_IMAGE_PATH(TEXT("")),PICTURIZE_LOADALL|PICTURIZE_RESIZE,32, 32);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
