Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TVirtualGraphPainter.cxx
Go to the documentation of this file.
1// @(#)root/hist:$Id$
2// Author: Olivier Couet 20/05/08
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, 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 "TROOT.h"
14#include "TPluginManager.h"
15
17
19
20/** \class TVirtualGraphPainter
21 \ingroup Histpainter
22 Abstract interface to a histogram painter
23*/
24
25////////////////////////////////////////////////////////////////////////////////
26/// Static function returning a pointer to the current graph painter.
27/// If the graph painter does not exist a default painter (singleton) is created.
28
30{
31 // if no painter set yet, create a default painter via the PluginManager
32 if (!fgPainter) {
34 if ((h = gROOT->GetPluginManager()->FindHandler("TVirtualGraphPainter"))) {
35 if (h->LoadPlugin() == -1) return 0;
36 fgPainter = (TVirtualGraphPainter*)gROOT->GetClass("TGraphPainter")->New();
37 }
38 }
39
40 // Create an instance of the graph painter
41 return fgPainter;
42}
43
44////////////////////////////////////////////////////////////////////////////////
45/// Static function to set an alternative histogram painter.
46
48{
49 fgPainter = painter;
50}
#define h(i)
Definition RSha256.hxx:106
#define ClassImp(name)
Definition Rtypes.h:377
#define gROOT
Definition TROOT.h:405
Abstract interface to a histogram painter.
static TVirtualGraphPainter * fgPainter
static void SetPainter(TVirtualGraphPainter *painter)
Static function to set an alternative histogram painter.
static TVirtualGraphPainter * GetPainter()
Static function returning a pointer to the current graph painter.