<commit_before>// @(#)root/gpad:$Id$
// Author: <NAME>   10/03/2007

/*************************************************************************
 * Copyright (C) 1995-2007, <NAME> and <NAME>.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "Riostream.h"
#include "TROOT.h"
#include "TColorWheel.h"
#include "TCanvas.h"
#include "TText.h"
#include "TGraph.h"
#include "TArc.h"
#include "TLine.h"
#include "TColor.h"
#include "TMath.h"

ClassImp(TColorWheel);

/** \class TColorWheel
\ingroup gpad

Draw the ROOT Color Wheel.

The wheel contains the recommended 216 colors to be used in web applications.
The colors in the Color Wheel are created by TColor::CreateColorWheel.

Using this color set for your text, background or graphics will give your
application a consistent appearance across different platforms and browsers.

Colors are grouped by hue, the aspect most important in human perception.
Touching color chips have the same hue, but with different brightness and vividness.

Colors of slightly different hues __clash__. If you intend to display
colors of the same hue together, you should pick them from the same group.

Each color chip is identified by a mnemonic (e.g. kYellow) and a number.
The keywords, kRed, kBlue, kYellow, kPink, etc are defined in the header file __Rtypes.h__
that is included in all ROOT other header files. We strongly recommend to use these keywords
in your code instead of hardcoded color numbers, e.g.:
~~~ {.cpp}
   myObject.SetFillColor(kRed);
   myObject.SetFillColor(kYellow-10);
   myLine.SetLineColor(kMagenta+2);
~~~

Begin_Macro
{
   TColorWheel *w = new TColorWheel();
   w->Draw();
}
End_Macro
*/

////////////////////////////////////////////////////////////////////////////////
/// constructor

TColorWheel::TColorWheel() :TNamed("wheel","ROOT Color Wheel")
{
   fCanvas = 0;
   fArc    = 0;
   fLine   = 0;
   fText   = 0;
   fGraph  = 0;
   fRmin   = 2.1;
   fRmax   = 9.5;
   fR0     = 4;
   fDr     = 1;
   fRgray  = 1.8;
   fX[ 0]  = fR0-0.2*fDr; fY[ 0] =  0;
   fX[ 1]  = fR0+fDr;     fY[ 1] =  0.75*fDr;
   fX[ 2]  = fR0+fDr;     fY[ 2] = -0.75*fDr;
   fX[ 3]  = fR0+2.2*fDr; fY[ 3] =  1.5*fDr;
   fX[ 4]  = fR0+2.2*fDr; fY[ 4] =  0;
   fX[ 5]  = fR0+2.2*fDr; fY[ 5] = -1.5*fDr;
   fX[ 6]  = fR0+3.4*fDr; fY[ 6] =  2.2*fDr;
   fX[ 7]  = fR0+3.4*fDr; fY[ 7] =  0.7*fDr;
   fX[ 8]  = fR0+3.4*fDr; fY[ 8] = -0.7*fDr;
   fX[ 9]  = fR0+3.4*fDr; fY[ 9] = -2.2*fDr;<commit_msg>High def image<commit_after>// @(#)root/gpad:$Id$
// Author: <NAME>   10/03/2007

/*************************************************************************
 * Copyright (C) 1995-2007, <NAME> and <NAME>.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "Riostream.h"
#include "TROOT.h"
#include "TColorWheel.h"
#include "TCanvas.h"
#include "TText.h"
#include "TGraph.h"
#include "TArc.h"
#include "TLine.h"
#include "TColor.h"
#include "TMath.h"

ClassImp(TColorWheel);

/** \class TColorWheel
\ingroup gpad

Draw the ROOT Color Wheel.

The wheel contains the recommended 216 colors to be used in web applications.
The colors in the Color Wheel are created by TColor::CreateColorWheel.

Using this color set for your text, background or graphics will give your
application a consistent appearance across different platforms and browsers.

Colors are grouped by hue, the aspect most important in human perception.
Touching color chips have the same hue, but with different brightness and vividness.

Colors of slightly different hues __clash__. If you intend to display
colors of the same hue together, you should pick them from the same group.

Each color chip is identified by a mnemonic (e.g. kYellow) and a number.
The keywords, kRed, kBlue, kYellow, kPink, etc are defined in the header file __Rtypes.h__
that is included in all ROOT other header files. We strongly recommend to use these keywords
in your code instead of hardcoded color numbers, e.g.:
~~~ {.cpp}
   myObject.SetFillColor(kRed);
   myObject.SetFillColor(kYellow-10);
   myLine.SetLineColor(kMagenta+2);
~~~

Begin_Macro("width=400")
{
   TColorWheel *w = new TColorWheel();
   cw = new TCanvas("cw","cw",0,0,1200,1200);
   w->SetCanvas(cw);
   w->Draw();
}
End_Macro
*/

////////////////////////////////////////////////////////////////////////////////
/// constructor

TColorWheel::TColorWheel() :TNamed("wheel","ROOT Color Wheel")
{
   fCanvas = 0;
   fArc    = 0;
   fLine   = 0;
   fText   = 0;
   fGraph  = 0;
   fRmin   = 2.1;
   fRmax   = 9.5;
   fR0     = 4;
   fDr     = 1;
   fRgray  = 1.8;
   fX[ 0]  = fR0-0.2*fDr; fY[ 0] =  0;
   fX[ 1]  = fR0+fDr;     fY[ 1] =  0.75*fDr;
   fX[ 2]  = fR0+fDr;     fY[ 2] = -0.75*fDr;
   fX[ 3]  = fR0+2.2*fDr; fY[ 3] =  1.5*fDr;
   fX[ 4]  = fR0+2.2*fDr; fY[ 4] =  0;
   fX[ 5]  = fR0+2.2*fDr; fY[ 5] = -1.5*fDr;
   fX[ 6]  = fR0+3.4*fDr; fY[ 6] =  2.2*fDr;
   fX[ 7]  = fR0+3.4*fDr; fY[ 7] =  0.7*fDr;
   fX[ 8]  = fR0+3.4*fDr; fY[ 8] = -0.7*fDr;
   fX[ 9]  = fR0+3.4*fDr; fY[ 9] = -2.2*fDr;
{'fraction_non_alphanumeric': 0.20063750664069419, 'fraction_numerical': 0.03842748361962104, 'mean_word_length': 2.408569704284852, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3374019', 'n_tokens_mistral': 2163, 'n_tokens_neox': 2009, 'n_words': 605}