library: libGraf
#include "TCrown.h"

TCrown


class description - source file - inheritance tree (.pdf)

class TCrown : public TEllipse

Inheritance Chart:
TObject
TAttLine
TAttFill
<-
TEllipse
<-
TCrown

    public:
TCrown() TCrown(Double_t x1, Double_t y1, Double_t radin, Double_t radout, Double_t phimin = 0, Double_t phimax = 360) TCrown(const TCrown& crown) virtual ~TCrown() static TClass* Class() virtual void Copy(TObject& crown) const virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) virtual void DrawCrown(Double_t x1, Double_t y1, Double_t radin, Double_t radout, Double_t phimin = 0, Double_t phimax = 360, Option_t* option = "") virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) virtual TClass* IsA() const TCrown& operator=(const TCrown&) virtual void Paint(Option_t* option = "") virtual void SavePrimitive(ofstream& out, Option_t* option) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members




Class Description

  A crown is specified with the position of its centre, its inner/outer radius
  a minimum and maximum angle.
  The attributes of the outline line are given via TAttLine
  The attributes of the fill area are given via TAttFill

  Example
{
   gROOT->Reset();
   TCanvas c1("c1","c1",400,400);
   TCrown cr1(.5,.5,.3,.4);
   cr1->SetLineStyle(2);
   cr1->SetLineWidth(4);
   cr1.Draw();
   TCrown cr2(.5,.5,.2,.3,45,315);
   cr2.SetFillColor(38);
   cr2.SetFillStyle(3010);
   cr2.Draw();
   TCrown cr3(.5,.5,.2,.3,-45,45);
   cr3.SetFillColor(50);
   cr3.SetFillStyle(3025);
   cr3.Draw();
   TCrown cr4(.5,.5,.0,.2);
   cr4.SetFillColor(4);
   cr4.SetFillStyle(3008);
   cr4.Draw();
}
/* */


TCrown(): TEllipse()
*-*-*-*-*-*-*-*-*-*-*crown  default constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ========================

TCrown(Double_t x1, Double_t y1,Double_t radin, Double_t radout,Double_t phimin,Double_t phimax) :TEllipse(x1,y1,radin,radout,phimin,phimax,0)
*-*-*-*-*-*-*-*-*-*-*Crown  normal constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  =======================
  x1,y1  : coordinates of centre of crown
  radin  : inner crown radius
  radout : outer crown radius
  phimin : min and max angle in degrees (default is 0-->360)
  phimax :

  When a crown sector only is drawn, the lines connecting the center
  of the crown to the edges are drawn by default. One can specify
  the drawing option "only" to not draw these lines.


TCrown(const TCrown &crown) : TEllipse(crown)

~TCrown()
 crown  default destructor

void Copy(TObject &crown) const
 Copy this crown to crown

Int_t DistancetoPrimitive(Int_t px, Int_t py)
 Compute distance from point px,py to a crown

 if crown is filled, return OK if we are inside
 otherwise, crown is found if near the crown edges

void DrawCrown(Double_t x1, Double_t y1,Double_t radin,Double_t radout,Double_t phimin,Double_t phimax,Option_t *option)
 Draw this crown with new coordinates

void ExecuteEvent(Int_t event, Int_t px, Int_t py)
 Execute action corresponding to one event

  For the time being TEllipse::ExecuteEvent is OK

void Paint(Option_t *)
 Paint this crown with its current attributes

void SavePrimitive(ofstream &out, Option_t *)
 Save primitive as a C++ statement(s) on output stream out



Inline Functions


            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
            TCrown& operator=(const TCrown&)


Author: Rene Brun 108/08/2002
Last update: root/graf:$Name: $:$Id: TCrown.cxx,v 1.4 2005/01/13 21:39:40 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

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.