Added wxDC::CreateGraphicsContext and implemented it for a few DCs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2008-04-25 11:05:16 +00:00
parent 4c7b80fb91
commit 2b44ffc0e7
11 changed files with 99 additions and 0 deletions

View File

@@ -42,6 +42,11 @@ class WXDLLIMPEXP_FWD_CORE wxMemoryDC;
class WXDLLIMPEXP_FWD_CORE wxPrinterDC;
class WXDLLIMPEXP_FWD_CORE wxPrintData;
#if wxUSE_GRAPHICS_CONTEXT
class WXDLLIMPEXP_FWD_CORE wxGraphicsContext;
#endif
//-----------------------------------------------------------------------------
// wxDrawObject helper class
//-----------------------------------------------------------------------------
@@ -182,6 +187,15 @@ public:
virtual bool CanDrawBitmap() const = 0;
virtual bool CanGetTextExtent() const = 0;
// get graphics context from
#if wxUSE_GRAPHICS_CONTEXT
virtual wxGraphicsContext* CreateGraphicsContext()
{
return NULL;
}
#endif
// query dimension, colour deps, resolution
virtual void DoGetSize(int *width, int *height) const = 0;
@@ -620,6 +634,11 @@ public:
bool IsOk() const
{ return m_pimpl && m_pimpl->IsOk(); }
#if wxUSE_GRAPHICS_CONTEXT
wxGraphicsContext* CreateGraphicsContext()
{ return m_pimpl->CreateGraphicsContext(); }
#endif
// query capabilities
bool CanDrawBitmap() const