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:
Václav Slavík
2017-01-05 17:05:11 +01:00
committed by Václav Slavík
parent e99abe513a
commit e71be91ebe
6 changed files with 59 additions and 0 deletions

View File

@@ -445,6 +445,10 @@ public:
static wxGraphicsContext* CreateFromNativeWindow( void * window );
#ifdef __WXMSW__
static wxGraphicsContext* CreateFromNativeHDC(WXHDC dc);
#endif
static wxGraphicsContext* Create( wxWindow* window );
#if wxUSE_IMAGE
@@ -830,6 +834,10 @@ public:
virtual wxGraphicsContext * CreateContextFromNativeWindow( void * window ) = 0;
#ifdef __WXMSW__
virtual wxGraphicsContext * CreateContextFromNativeHDC(WXHDC dc) = 0;
#endif
virtual wxGraphicsContext * CreateContext( wxWindow* window ) = 0;
#if wxUSE_IMAGE