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
@@ -961,6 +961,13 @@ wxGraphicsContext* wxGraphicsContext::CreateFromNativeWindow( void * window )
|
||||
return wxGraphicsRenderer::GetDefaultRenderer()->CreateContextFromNativeWindow(window);
|
||||
}
|
||||
|
||||
#ifdef __WXMSW__
|
||||
wxGraphicsContext* wxGraphicsContext::CreateFromNativeHDC(WXHDC dc)
|
||||
{
|
||||
return wxGraphicsRenderer::GetDefaultRenderer()->CreateContextFromNativeHDC(dc);
|
||||
}
|
||||
#endif
|
||||
|
||||
wxGraphicsContext* wxGraphicsContext::Create( wxWindow* window )
|
||||
{
|
||||
return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(window);
|
||||
|
||||
Reference in New Issue
Block a user