exposing wxGraphicsContext through an ordinary wxDC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
c08598f6cd
commit
e516208e3d
@ -43,6 +43,10 @@ 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
|
||||
|
||||
// Logical ops
|
||||
enum wxRasterOperationMode
|
||||
{
|
||||
@ -640,6 +644,13 @@ public:
|
||||
virtual int GetResolution() const
|
||||
{ return -1; }
|
||||
|
||||
#if wxUSE_GRAPHICS_CONTEXT
|
||||
virtual wxGraphicsContext* GetGraphicsContext() const
|
||||
{ return NULL; }
|
||||
virtual void SetGraphicsContext( wxGraphicsContext* WXUNUSED(ctx) )
|
||||
{}
|
||||
#endif
|
||||
|
||||
private:
|
||||
wxDC *m_owner;
|
||||
|
||||
@ -1329,6 +1340,17 @@ public:
|
||||
TempHDC GetTempHDC() { return TempHDC(*this); }
|
||||
#endif // __WXMSW__
|
||||
|
||||
#if wxUSE_GRAPHICS_CONTEXT
|
||||
virtual wxGraphicsContext* GetGraphicsContext() const
|
||||
{
|
||||
return m_pimpl->GetGraphicsContext();
|
||||
}
|
||||
virtual void SetGraphicsContext( wxGraphicsContext* ctx )
|
||||
{
|
||||
m_pimpl->SetGraphicsContext(ctx);
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
// ctor takes ownership of the pointer
|
||||
wxDC(wxDCImpl *pimpl) : m_pimpl(pimpl) { }
|
||||
|
Loading…
Reference in New Issue
Block a user