#include "ltwrappr.h"
virtual HDC LBitmapBase::CreateLeadDC()
Provides a powerful set of graphics features by creating a Microsoft Windows device context, using the LBitmapBase object's bitmap as the display surface.
>0 |
Function was successful. The return value is the HDC. |
NULL |
An error occurred. |
This allows you to create an infinite number of drawing capabilities such as paint, erase, color erase and brush, pen, spray gun, flood fill, color tube, text overlay, curve, line, rectangle, polygon, ellipse, freehand shapes, cut and paste, and more.
All Windows GDI functions can be used to draw to the bitmap using the returned HDC. The HDC must be freed with the LBitmapBase::DeleteLeadDC function.
Note: |
For WIN32 applications, this function ensures that the bitmap's view perspective is BOTTOM_LEFT, flipping the bitmap if necessary. This can affect functions that use bitmap coordinates. For more information, refer to Accounting for View Perspective. |
If a region is defined for the bitmap, GDI functions act only on the region, not on the entire bitmap.
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: |
|
Topics: |
|
|
|
|
|
#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName
L_INT LBitmapBase__CreateLeadDCExample()
{
L_INT nRet;
LBitmapBase MyBitmap;
HDC hDC;
MyBitmap.SetFileName(MAKE_IMAGE_PATH(TEXT("image1.cmp")));
nRet =MyBitmap.Load();
if(nRet !=SUCCESS)
return nRet;
hDC=MyBitmap.CreateLeadDC();
/*use the returned DC to draw to the bitmap*/
if(hDC) /*finished using the DC*/
MyBitmap.DeleteLeadDC(hDC);
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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.