Add API to create wxGraphicsContext from win32 HDC
Add wxGraphicsContext::CreateFromNativeHDC() and wxGraphicsRenderer:: CreateContextFromNativeHDC() to allow creation not only from native renderer object, but also from HDC, which is something universally supported by win32 implementations.
This commit is contained in:
committed by
Václav Slavík
parent
e99abe513a
commit
e71be91ebe
@@ -482,6 +482,15 @@ public:
|
||||
*/
|
||||
static wxGraphicsContext* CreateFromNativeWindow(void* window);
|
||||
|
||||
/**
|
||||
Creates a wxGraphicsContext from a native DC handle. Windows only.
|
||||
|
||||
@see wxGraphicsRenderer::CreateContextFromNativeHDC()
|
||||
|
||||
@since 3.1.1
|
||||
*/
|
||||
static wxGraphicsContext* CreateFromNativeHDC(WXHDC dc);
|
||||
|
||||
/**
|
||||
Create a lightweight context that can be used only for measuring text.
|
||||
*/
|
||||
@@ -1321,6 +1330,13 @@ public:
|
||||
*/
|
||||
virtual wxGraphicsContext* CreateContextFromNativeWindow(void* window) = 0;
|
||||
|
||||
/**
|
||||
Creates a wxGraphicsContext from a native DC handle. Windows only.
|
||||
|
||||
@since 3.1.1
|
||||
*/
|
||||
static wxGraphicsContext* CreateContextFromNativeHDC(WXHDC dc);
|
||||
|
||||
/**
|
||||
Creates a wxGraphicsContext that can be used for measuring texts only.
|
||||
No drawing commands are allowed.
|
||||
|
Reference in New Issue
Block a user