Wrapper for Direct2dViewer.cpp to provide a C API.
More...
Wrapper for Direct2dViewer.cpp to provide a C API.
Inspired by this tutorial to call cpp methods from c: https://bytes.com/topic/c/insights/921728-calling-c-class-methods-c
- Author
- Florian Hahn
- Date
- 30.09.2019
- Copyright
- Copyright Entwicklungsbuero Stresing. This software is release under the LPGL-3.0.
◆ Direct2dViewer_delete()
void Direct2dViewer_delete |
( |
void * | D2dV | ) |
|
Release resources.
- Parameters
-
◆ Direct2dViewer_getGammaBlack()
UINT16 Direct2dViewer_getGammaBlack |
( |
void * | D2dV | ) |
|
return gamma value black
- Parameters
-
◆ Direct2dViewer_getGammaWhite()
UINT16 Direct2dViewer_getGammaWhite |
( |
void * | D2dV | ) |
|
return gamma value white
- Parameters
-
◆ Direct2dViewer_getWindowHandler()
HWND Direct2dViewer_getWindowHandler |
( |
void * | D2dV | ) |
|
Returns the window handler of 2d viewer.
- Parameters
-
◆ Direct2dViewer_new()
void * Direct2dViewer_new |
( |
| ) |
|
◆ Direct2dViewer_repaintWindow()
void Direct2dViewer_repaintWindow |
( |
void * | D2dV | ) |
|
Reload the displayed bitmap in 2d viewer.
- Parameters
-
◆ Direct2dViewer_setGammaValue()
void Direct2dViewer_setGammaValue |
( |
void * | D2dV, |
|
|
UINT16 | white, |
|
|
UINT16 | black ) |
Set gamma value.
- Parameters
-
[in] | white | set value for maximum brightness. Default: 0xFFFF (16 bit), 0x3FFF (14 bit) |
[in] | black | set value for minimum brightness. Default: 0 |
[in] | D2dV | Handle of Direct2dViewer instance. |
◆ Direct2dViewer_showNewBitmap()
void Direct2dViewer_showNewBitmap |
( |
void * | D2dV, |
|
|
void * | addr, |
|
|
UINT | width, |
|
|
UINT | height ) |
Show a new bitmap in 2d viewer.
- Parameters
-
addr | Address to first byte of bitmap data. |
width | Width of bitmap. |
height | Height of bitmap. |
D2dV | Handle of Direct2dViewer instance. |
◆ Direct2dViewer_start2dViewer()
void Direct2dViewer_start2dViewer |
( |
void * | D2dV, |
|
|
HWND | hWndParent, |
|
|
void * | bitmapAddr, |
|
|
UINT | width, |
|
|
UINT | height ) |
Starts 2d viewer with a initial bitmap. Use this to start 2d viewer. Call constructor before.
- Parameters
-
hWndParent | Window handler of parent window. |
bitmapAddr | Address to first byte of bitmap data. |
width | Width of bitmap. |
height | Height of bitmap. |
D2dV | Handle of Direct2dViewer instance. |