Logo ROOT   6.08/07
Reference Guide
QuartzUtils.h
Go to the documentation of this file.
1 // @(#)root/graf2d:$Id$
2 // Author: Timur Pocheptsov, 11/06/2012
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2011, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_QuartzUtils
13 #define ROOT_QuartzUtils
14 
15 #include <ApplicationServices/ApplicationServices.h>
16 
17 #ifndef ROOT_CocoaUtils
18 #include "CocoaUtils.h"
19 #endif
20 
21 namespace ROOT {
22 namespace Quartz {
23 
24 //Scope guard class for CGContextRef.
25 class CGStateGuard {
26 public:
28  explicit CGStateGuard(CGContextRef ctx);
29  ~CGStateGuard();
30 
31 private:
32  CGContextRef fCtx;
33 
34  CGStateGuard(const CGStateGuard &rhs);
36 };
37 
38 //Scope guard for AA flag (due to some reason it's not
39 //saved/restored as a part of a context state).
41 public:
42  CGAAStateGuard(CGContextRef ctx, bool enable);
43  ~CGAAStateGuard();
44 
45 private:
46  CGContextRef fCtx;
47  bool fEnable;
48 
49  CGAAStateGuard(const CGAAStateGuard &rhs);
51 
52 };
53 
54 }
55 }
56 
57 #endif
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
Definition: StringConv.hxx:21
CGStateGuard(MacOSX::Util::CFScopeGuard< CGContextRef > &ctx)
Definition: QuartzUtils.mm:20
CGStateGuard & operator=(const CGStateGuard &rhs)