diff options
Diffstat (limited to 'core/fxge')
-rw-r--r-- | core/fxge/cfx_renderdevice.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/fxge/cfx_renderdevice.h b/core/fxge/cfx_renderdevice.h index 794c2fec6b..6aa4528f05 100644 --- a/core/fxge/cfx_renderdevice.h +++ b/core/fxge/cfx_renderdevice.h @@ -83,6 +83,17 @@ class FXTEXT_CHARPOS { class CFX_RenderDevice { public: + class StateRestorer { + public: + explicit StateRestorer(CFX_RenderDevice* pDevice) : m_pDevice(pDevice) { + m_pDevice->SaveState(); + } + ~StateRestorer() { m_pDevice->RestoreState(false); } + + private: + CFX_RenderDevice* m_pDevice; + }; + CFX_RenderDevice(); virtual ~CFX_RenderDevice(); |