ROOT
Version v6.32
master
v6.34
v6.32
v6.30
v6.28
v6.26
v6.24
v6.22
v6.20
v6.18
v6.16
v6.14
v6.12
v6.10
v6.08
v6.06
v6.04
Reference Guide
▼
ROOT
ROOT Reference Documentation
Tutorials
►
Functional Parts
►
Namespaces
►
All Classes
▼
Files
▼
File List
►
bindings
►
core
►
documentation
►
geom
▼
graf2d
►
asimage
►
cocoa
►
fitsio
►
gpad
►
gpadv7
►
graf
►
gviz
►
postscript
▼
quartz
►
inc
▼
src
►
QuartzFillArea.mm
►
QuartzLine.mm
►
QuartzMarker.mm
►
QuartzText.mm
QuartzUtils.mm
►
win32gdk
►
x11
►
x11ttf
►
graf3d
►
gui
►
hist
►
html
►
io
►
main
►
math
►
montecarlo
►
net
►
proof
►
roofit
►
sql
►
tmva
►
tree
►
tutorials
►
v6-32-00-patches
►
File Members
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
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
QuartzUtils.h
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
CGContextRef
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
ROOT::MacOSX::Util::CFScopeGuard
Definition
CocoaUtils.h:268
ROOT::Quartz::CGAAStateGuard::fCtx
CGContextRef fCtx
Definition
QuartzUtils.h:44
ROOT::Quartz::CGAAStateGuard::CGAAStateGuard
CGAAStateGuard(CGContextRef ctx, bool enable)
Definition
QuartzUtils.mm:45
ROOT::Quartz::CGAAStateGuard::fEnable
bool fEnable
Definition
QuartzUtils.h:45
ROOT::Quartz::CGAAStateGuard::~CGAAStateGuard
~CGAAStateGuard()
Definition
QuartzUtils.mm:56
ROOT::Quartz::CGStateGuard::CGStateGuard
CGStateGuard(MacOSX::Util::CFScopeGuard< CGContextRef > &ctx)
Definition
QuartzUtils.mm:20
ROOT::Quartz::CGStateGuard::fCtx
CGContextRef fCtx
Definition
QuartzUtils.h:30
ROOT::Quartz::CGStateGuard::~CGStateGuard
~CGStateGuard()
Definition
QuartzUtils.mm:36
ROOT::Quartz
Definition
QuartzFillArea.h:33
ROOT
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition
EExecutionPolicy.hxx:4
graf2d
quartz
src
QuartzUtils.mm
ROOT v6-32 - Reference Guide Generated on Sun Mar 9 2025 03:56:39 (GVA Time) using Doxygen 1.10.0