Loading [MathJax]/extensions/MathMenu.js
ROOT
6.08/07
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
+
Namespaces
Namespace List
+
Namespace Members
+
All
2
3
<
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
<
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
2
3
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
u
v
x
+
Enumerations
a
d
e
f
g
h
m
p
t
v
w
y
+
Enumerator
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
u
v
w
+
All Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
x
y
+
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
w
y
+
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Properties
f
+
Related Functions
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Files
File List
+
File Members
+
All
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Enumerations
c
e
f
i
l
m
p
r
u
x
+
Enumerator
a
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
v
w
x
y
z
+
Macros
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
graf2d
quartz
src
QuartzUtils.mm
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
#include <cassert>
13
14
#include "
QuartzUtils.h
"
15
16
namespace
ROOT
{
17
namespace
Quartz
{
18
19
//______________________________________________________________________________
20
CGStateGuard::CGStateGuard
(
MacOSX::Util::CFScopeGuard<CGContextRef>
&ctx)
21
: fCtx(ctx.Get())
22
{
23
assert(
fCtx
!= 0 &&
"CGStateGuard, ctx parameter is null"
);
24
CGContextSaveGState(
fCtx
);
25
}
26
27
//______________________________________________________________________________
28
CGStateGuard::CGStateGuard
(CGContextRef ctx)
29
:
fCtx
(ctx)
30
{
31
assert(ctx != 0 &&
"CGStateGuard, ctx parameter is null"
);
32
CGContextSaveGState(ctx);
33
}
34
35
//______________________________________________________________________________
36
CGStateGuard::~CGStateGuard
()
37
{
38
CGContextRestoreGState(
fCtx
);
39
}
40
41
//Actually, this class does any work only if you disable anti-aliasing, by default I have it on
42
//and there is nothing to do for a guard if you want it on.
43
44
//______________________________________________________________________________
45
CGAAStateGuard::CGAAStateGuard
(CGContextRef ctx,
bool
enable)
46
:
fCtx
(ctx),
47
fEnable(enable)
48
{
49
assert(ctx != 0 &&
"CGAAStateGuard, ctx parameter is null"
);
50
51
if
(!enable)
52
CGContextSetAllowsAntialiasing(ctx,
false
);
53
}
54
55
//______________________________________________________________________________
56
CGAAStateGuard::~CGAAStateGuard
()
57
{
58
//Enable it back:
59
if
(!
fEnable
)
60
CGContextSetAllowsAntialiasing(
fCtx
,
true
);
61
}
62
63
}
//Quartz
64
}
//ROOT
ROOT::Quartz::CGAAStateGuard::~CGAAStateGuard
~CGAAStateGuard()
Definition:
QuartzUtils.mm:56
ROOT
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
Definition:
StringConv.hxx:21
ROOT::Quartz::CGStateGuard::CGStateGuard
CGStateGuard(MacOSX::Util::CFScopeGuard< CGContextRef > &ctx)
Definition:
QuartzUtils.mm:20
ROOT::MacOSX::Util::CFScopeGuard< CGContextRef >
QuartzUtils.h
ROOT::Quartz::CGStateGuard::fCtx
CGContextRef fCtx
Definition:
QuartzUtils.h:32
ROOT::Quartz::CGStateGuard::~CGStateGuard
~CGStateGuard()
Definition:
QuartzUtils.mm:36
ROOT::Quartz::CGAAStateGuard::fCtx
CGContextRef fCtx
Definition:
QuartzUtils.h:46
ROOT::Quartz::CGAAStateGuard::fEnable
bool fEnable
Definition:
QuartzUtils.h:47
ROOT::Quartz::CGAAStateGuard::CGAAStateGuard
CGAAStateGuard(CGContextRef ctx, bool enable)
Definition:
QuartzUtils.mm:45
ROOT::Quartz
Definition:
QuartzFillArea.h:41