74 :
TEllipse(x1,y1,radin,radout,phimin,phimax,0)
83 crown.TCrown::Copy(*
this);
110 if (!
gPad)
return 9999;
125 if (
r > r2)
return dist;
126 if (
r < r1)
return dist;
129 if (
y<0) phi = 360-phi;
132 if (phi1<0) phi1=phi1+360;
133 if (phi2<0) phi2=phi2+360;
135 if (phi < phi1 && phi > phi2)
return dist;
137 if (phi < phi1)
return dist;
138 if (phi > phi2)
return dist;
156 TCrown *newcrown =
new TCrown(x1, y1, radin, radout, phimin, phimax);
183 static Double_t xc[2 * np + 3], yc[2 * np + 3];
192 for (i = 0; i <= np; i++) {
200 for (i = 0; i <= np; i++) {
207 xc[2 * np + 2] = xc[0];
208 yc[2 * np + 2] = yc[0];
232 for (i = 0; i <= np; i++) {
240 for (i = 0; i <= np; i++) {
247 x[2 * np + 2] =
x[0];
248 y[2 * np + 2] =
y[0];
252 gPad->PaintFillArea(2 * np + 2,
x,
y);
256 gPad->PaintPolyLine(np + 1,
x,
y);
257 gPad->PaintPolyLine(np + 1,&
x[np + 1],&
y[np + 1]);
272 TString::Format(
"%g, %g, %g, %g, %g, %g",
fX1,
fY1,
fR1,
fR2,
fPhimin,
fPhimax));
278 out <<
" crown->SetNoEdges();\n";
281 out <<
" crown->SetYXRatio(" <<
fYXRatio <<
");\n";
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
const char Option_t
Option string (const char).
virtual Color_t GetFillColor() const
Return the fill area color.
void Copy(TAttFill &attfill) const
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
virtual Style_t GetLineStyle() const
Return the line style.
void Copy(TAttLine &attline) const
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Computes distance from point (px,py) to the object.
Double_t GetYXRatio() const
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to an event at (px,py).
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
Int_t IsInside(Double_t x, Double_t y) const
void Paint(Option_t *option="") override
This method must be overridden if a class wants to paint itself.
void Copy(TObject &crown) const override
Copy this to obj.
virtual TCrown * DrawCrown(Double_t x1, Double_t y1, Double_t radin, Double_t radout, Double_t phimin=0, Double_t phimax=360, Option_t *option="")
void SetYXRatio(Double_t v=1)
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to an event at (px,py).
Double_t fPhimax
Maximum angle (degrees).
Double_t fX1
X coordinate of centre.
Bool_t GetNoEdges() const
Double_t fY1
Y coordinate of centre.
Double_t fTheta
Rotation angle (degrees).
Double_t fR2
second radius
void Copy(TObject &ellipse) const override
Copy this to obj.
Double_t fPhimin
Minimum angle (degrees).
Mother of all ROOT objects.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
static void SavePrimitiveDraw(std::ostream &out, const char *variable_name, Option_t *option=nullptr)
Save invocation of primitive Draw() method Skipped if option contains "nodraw" string.
static void SavePrimitiveConstructor(std::ostream &out, TClass *cl, const char *variable_name, const char *constructor_agrs="", Bool_t empty_line=kTRUE)
Save object constructor in the output stream "out".
@ kCanDelete
if object in a list can be deleted
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
double dist(Rotation3D const &r1, Rotation3D const &r2)
Double_t ACos(Double_t)
Returns the principal value of the arc cosine of x, expressed in radians.
Bool_t IsInside(T xp, T yp, Int_t np, T *x, T *y)
Function which returns kTRUE if point xp,yp lies inside the polygon defined by the np points in array...
Double_t Sqrt(Double_t x)
Returns the square root of x.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.