diff options
Diffstat (limited to 'cairomm/context.cc')
-rw-r--r-- | cairomm/context.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cairomm/context.cc b/cairomm/context.cc index 25673e8..ce1a838 100644 --- a/cairomm/context.cc +++ b/cairomm/context.cc @@ -886,6 +886,16 @@ RefPtr<const Surface> Context::get_group_target() const return get_surface_wrapper(surface); } +SaveGuard::SaveGuard(RefPtr<Context> context) : ctx_{context} +{ + ctx_->save(); +} + +SaveGuard::~SaveGuard() +{ + ctx_->restore(); +} + } //namespace Cairo // vim: ts=2 sw=2 et |