- The modification done in Revision 1.13 to paint the top of a THStack with   the right color was not working properly in certain cases when there was   more than 3 histograms in the stack: specifically if in a given bin only   one of the histograms is non-empty, then the top of that bin was wrongly   colored with the color of the lowest element of the stack.   This patch fixes this problem. This problem could be seen with the   following example:
- The modification done in Revision 1.13 to paint the top of a THStack with
  the right color was not working properly in certain cases when there was
  more than 3 histograms in the stack: specifically if in a given bin only
  one of the histograms is non-empty, then the top of that bin was wrongly
  colored with the color of the lowest element of the stack.
  This patch fixes this problem. This problem could be seen with the
  following example:

  void test_lego_stack () {
    TH2F * h1 = new TH2F("h1","h1",5,0,6,5,-4,4);
    TH2F * h2 = new TH2F("h2","h1",5,0,6,5,-4,4);
    TH2F * h3 = new TH2F("h3","h1",5,0,6,5,-4,4);
    TH2F * h4 = new TH2F("h4","h1",5,0,6,5,-4,4);
    TH2F * h5 = new TH2F("h5","h1",5,0,6,5,-4,4);
    h1->SetFillColor(1); // grey
    h2->SetFillColor(2); // red
    h3->SetFillColor(3); // green
    h4->SetFillColor(4); // blue
    h5->SetFillColor(5); // yellow
    h2->Fill(2,0,11);
    h3->Fill(3,0,12);
    h4->Fill(4,0,13);
    h5->Fill(5,0,14);
    THStack * hs = new THStack("hs","test of stack");
    hs->Add(h1);
    hs->Add(h2);
    hs->Add(h3);
    hs->Add(h4);
    hs->Add(h5);
    hs->Draw("lego1");
  }


git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@14094 27541ba8-7e3a-0410-8455-c3a389f83636

krafczyk/root,sirinath/root,omazapa/root,mkret2/root,esakellari/my_root_for_test,jrtomps/root,nilqed/root,CristinaCristescu/root,georgtroska/root,gbitzes/root,Duraznos/root,zzxuanyuan/root,tc3t/qoot,sawenzel/root,lgiommi/root,sirinath/root,georgtroska/root,BerserkerTroll/root,gbitzes/root,cxx-hep/root-cern,sawenzel/root,sbinet/cxx-root,agarciamontoro/root,davidlt/root,vukasinmilosevic/root,evgeny-boger/root,alexschlueter/cern-root,0x0all/ROOT,zzxuanyuan/root,BerserkerTroll/root,zzxuanyuan/root-compressor-dummy,Duraznos/root,Y--/root,CristinaCristescu/root,mkret2/root,Y--/root,Y--/root,nilqed/root,jrtomps/root,zzxuanyuan/root-compressor-dummy,thomaskeck/root,gbitzes/root,mhuwiler/rootauto,Dr15Jones/root,omazapa/root,veprbl/root,gganis/root,pspe/root,evgeny-boger/root,esakellari/root,thomaskeck/root,cxx-hep/root-cern,beniz/root,buuck/root,agarciamontoro/root,nilqed/root,satyarth934/root,sbinet/cxx-root,veprbl/root,Duraznos/root,mhuwiler/rootauto,nilqed/root,dfunke/root,satyarth934/root,esakellari/my_root_for_test,smarinac/root,davidlt/root,satyarth934/root,lgiommi/root,gganis/root,cxx-hep/root-cern,agarciamontoro/root,sirinath/root,beniz/root,0x0all/ROOT,Dr15Jones/root,davidlt/root,gganis/root,davidlt/root,pspe/root,0x0all/ROOT,veprbl/root,Y--/root,omazapa/root,root-mirror/root,gbitzes/root,georgtroska/root,mkret2/root,georgtroska/root,mhuwiler/rootauto,mhuwiler/rootauto,Dr15Jones/root,satyarth934/root,strykejern/TTreeReader,agarciamontoro/root,sawenzel/root,tc3t/qoot,jrtomps/root,nilqed/root,root-mirror/root,lgiommi/root,beniz/root,jrtomps/root,bbockelm/root,alexschlueter/cern-root,evgeny-boger/root,beniz/root,satyarth934/root,abhinavmoudgil95/root,omazapa/root-old,beniz/root,alexschlueter/cern-root,georgtroska/root,veprbl/root,Duraznos/root,olifre/root,nilqed/root,satyarth934/root,veprbl/root,gbitzes/root,zzxuanyuan/root,BerserkerTroll/root,thomaskeck/root,pspe/root,kirbyherm/root-r-tools,lgiommi/root,root-mirror/root,karies/root,karies/root,buuck/root,georgtroska/root,karies/root,karies/root,sawenzel/root,ffurano/root5,esakellari/root,zzxuanyuan/root,gganis/root,cxx-hep/root-cern,sbinet/cxx-root,gganis/root,tc3t/qoot,beniz/root,omazapa/root-old,georgtroska/root,zzxuanyuan/root-compressor-dummy,evgeny-boger/root,karies/root,bbockelm/root,bbockelm/root,ffurano/root5,nilqed/root,pspe/root,kirbyherm/root-r-tools,alexschlueter/cern-root,bbockelm/root,esakellari/root,veprbl/root,sawenzel/root,smarinac/root,pspe/root,BerserkerTroll/root,Dr15Jones/root,0x0all/ROOT,krafczyk/root,Duraznos/root,mkret2/root,simonpf/root,Dr15Jones/root,mattkretz/root,davidlt/root,krafczyk/root,esakellari/root,abhinavmoudgil95/root,perovic/root,BerserkerTroll/root,zzxuanyuan/root-compressor-dummy,omazapa/root-old,arch1tect0r/root,root-mirror/root,krafczyk/root,ffurano/root5,vukasinmilosevic/root,gganis/root,mhuwiler/rootauto,arch1tect0r/root,omazapa/root,simonpf/root,buuck/root,evgeny-boger/root,sbinet/cxx-root,abhinavmoudgil95/root,gganis/root,cxx-hep/root-cern,root-mirror/root,smarinac/root,zzxuanyuan/root-compressor-dummy,sawenzel/root,smarinac/root,omazapa/root,smarinac/root,BerserkerTroll/root,evgeny-boger/root,smarinac/root,agarciamontoro/root,arch1tect0r/root,pspe/root,esakellari/root,vukasinmilosevic/root,nilqed/root,veprbl/root,simonpf/root,sirinath/root,perovic/root,pspe/root,krafczyk/root,smarinac/root,sawenzel/root,jrtomps/root,perovic/root,root-mirror/root,sirinath/root,omazapa/root-old,abhinavmoudgil95/root,Duraznos/root,ffurano/root5,Dr15Jones/root,omazapa/root,BerserkerTroll/root,Y--/root,0x0all/ROOT,mattkretz/root,krafczyk/root,mattkretz/root,simonpf/root,jrtomps/root,cxx-hep/root-cern,Y--/root,mattkretz/root,dfunke/root,olifre/root,zzxuanyuan/root,dfunke/root,esakellari/my_root_for_test,beniz/root,tc3t/qoot,zzxuanyuan/root-compressor-dummy,BerserkerTroll/root,nilqed/root,simonpf/root,esakellari/my_root_for_test,alexschlueter/cern-root,thomaskeck/root,olifre/root,pspe/root,perovic/root,esakellari/my_root_for_test,bbockelm/root,vukasinmilosevic/root,bbockelm/root,Dr15Jones/root,omazapa/root-old,gbitzes/root,zzxuanyuan/root,jrtomps/root,pspe/root,lgiommi/root,tc3t/qoot,omazapa/root-old,omazapa/root,satyarth934/root,simonpf/root,esakellari/my_root_for_test,georgtroska/root,mkret2/root,abhinavmoudgil95/root,satyarth934/root,arch1tect0r/root,beniz/root,simonpf/root,mkret2/root,esakellari/root,dfunke/root,strykejern/TTreeReader,omazapa/root,evgeny-boger/root,esakellari/root,dfunke/root,Y--/root,agarciamontoro/root,kirbyherm/root-r-tools,gbitzes/root,krafczyk/root,georgtroska/root,Duraznos/root,zzxuanyuan/root,zzxuanyuan/root,veprbl/root,lgiommi/root,tc3t/qoot,zzxuanyuan/root,CristinaCristescu/root,perovic/root,sirinath/root,sbinet/cxx-root,alexschlueter/cern-root,agarciamontoro/root,Y--/root,sawenzel/root,veprbl/root,nilqed/root,krafczyk/root,jrtomps/root,thomaskeck/root,karies/root,buuck/root,lgiommi/root,Duraznos/root,dfunke/root,arch1tect0r/root,sbinet/cxx-root,strykejern/TTreeReader,bbockelm/root,gbitzes/root,mattkretz/root,thomaskeck/root,karies/root,sirinath/root,esakellari/root,0x0all/ROOT,pspe/root,abhinavmoudgil95/root,lgiommi/root,mhuwiler/rootauto,esakellari/root,sbinet/cxx-root,buuck/root,root-mirror/root,sbinet/cxx-root,abhinavmoudgil95/root,evgeny-boger/root,buuck/root,gbitzes/root,buuck/root,mkret2/root,simonpf/root,agarciamontoro/root,olifre/root,gganis/root,omazapa/root-old,perovic/root,olifre/root,vukasinmilosevic/root,vukasinmilosevic/root,esakellari/root,davidlt/root,olifre/root,evgeny-boger/root,omazapa/root-old,simonpf/root,jrtomps/root,zzxuanyuan/root,gganis/root,veprbl/root,zzxuanyuan/root-compressor-dummy,abhinavmoudgil95/root,smarinac/root,CristinaCristescu/root,gganis/root,vukasinmilosevic/root,dfunke/root,mhuwiler/rootauto,mhuwiler/rootauto,smarinac/root,agarciamontoro/root,bbockelm/root,zzxuanyuan/root-compressor-dummy,karies/root,gbitzes/root,kirbyherm/root-r-tools,mattkretz/root,olifre/root,abhinavmoudgil95/root,mhuwiler/rootauto,0x0all/ROOT,strykejern/TTreeReader,arch1tect0r/root,strykejern/TTreeReader,zzxuanyuan/root-compressor-dummy,esakellari/my_root_for_test,agarciamontoro/root,karies/root,lgiommi/root,CristinaCristescu/root,davidlt/root,bbockelm/root,omazapa/root,0x0all/ROOT,omazapa/root,zzxuanyuan/root,jrtomps/root,CristinaCristescu/root,vukasinmilosevic/root,sbinet/cxx-root,bbockelm/root,vukasinmilosevic/root,sirinath/root,georgtroska/root,agarciamontoro/root,Duraznos/root,simonpf/root,olifre/root,CristinaCristescu/root,karies/root,sawenzel/root,davidlt/root,abhinavmoudgil95/root,ffurano/root5,root-mirror/root,davidlt/root,evgeny-boger/root,perovic/root,omazapa/root-old,sirinath/root,Y--/root,cxx-hep/root-cern,karies/root,dfunke/root,krafczyk/root,sawenzel/root,sbinet/cxx-root,esakellari/my_root_for_test,satyarth934/root,mkret2/root,Duraznos/root,arch1tect0r/root,davidlt/root,mkret2/root,CristinaCristescu/root,smarinac/root,BerserkerTroll/root,sawenzel/root,arch1tect0r/root,cxx-hep/root-cern,Duraznos/root,CristinaCristescu/root,BerserkerTroll/root,sirinath/root,buuck/root,esakellari/my_root_for_test,arch1tect0r/root,tc3t/qoot,thomaskeck/root,davidlt/root,buuck/root,arch1tect0r/root,zzxuanyuan/root,mattkretz/root,bbockelm/root,satyarth934/root,perovic/root,alexschlueter/cern-root,vukasinmilosevic/root,perovic/root,sbinet/cxx-root,Y--/root,georgtroska/root,mattkretz/root,omazapa/root-old,thomaskeck/root,root-mirror/root,mhuwiler/rootauto,omazapa/root-old,dfunke/root,tc3t/qoot,evgeny-boger/root,dfunke/root,mattkretz/root,sirinath/root,zzxuanyuan/root-compressor-dummy,BerserkerTroll/root,gbitzes/root,esakellari/root,olifre/root,mattkretz/root,kirbyherm/root-r-tools,ffurano/root5,buuck/root,ffurano/root5,simonpf/root,mkret2/root,krafczyk/root,lgiommi/root,beniz/root,dfunke/root,tc3t/qoot,strykejern/TTreeReader,lgiommi/root,perovic/root,olifre/root,omazapa/root,nilqed/root,perovic/root,jrtomps/root,esakellari/my_root_for_test,satyarth934/root,zzxuanyuan/root-compressor-dummy,beniz/root,olifre/root,mkret2/root,abhinavmoudgil95/root,mhuwiler/rootauto,root-mirror/root,pspe/root,0x0all/ROOT,mattkretz/root,CristinaCristescu/root,strykejern/TTreeReader,beniz/root,buuck/root,CristinaCristescu/root,vukasinmilosevic/root,tc3t/qoot,Y--/root,thomaskeck/root,thomaskeck/root,arch1tect0r/root,krafczyk/root,root-mirror/root,veprbl/root,kirbyherm/root-r-tools,kirbyherm/root-r-tools,gganis/root