// @(#)root/hist:$Id: TVirtualGraphPainter.cxx 24084 2008-06-01 15:34:01Z brun $
// Author: Olivier Couet 20/05/08

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "TROOT.h"
#include "TVirtualGraphPainter.h"
#include "TPluginManager.h"
#include "TClass.h"

TVirtualGraphPainter *TVirtualGraphPainter::fgPainter = 0;

ClassImp(TVirtualGraphPainter)

//______________________________________________________________________________
//
//  TVirtualGraphPainter is an abstract interface to a histogram painter.
//


//______________________________________________________________________________
TVirtualGraphPainter *TVirtualGraphPainter::GetPainter()
{
   // Static function returning a pointer to the current graph painter.
   // If the graph painter does not exist a default painter (singleton) is created.

   // if no painter set yet, create a default painter via the PluginManager
   if (!fgPainter) {
      TPluginHandler *h;
      if ((h = gROOT->GetPluginManager()->FindHandler("TVirtualGraphPainter"))) {
         if (h->LoadPlugin() == -1) return 0;
         fgPainter = (TVirtualGraphPainter*)gROOT->GetClass("TGraphPainter")->New();
      }
   }

   // Create an instance of the graph painter
   return fgPainter;
}

//______________________________________________________________________________
void TVirtualGraphPainter::SetPainter(TVirtualGraphPainter *painter)
{
   // Static function to set an alternative histogram painter.

   fgPainter = painter;
}

Last change: Wed Jun 25 08:54:48 2008
Last generated: 2008-06-25 08:54

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.