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;
192 for (i = 0; i <=
np; i++) {
196 xc[i] =
fX1 + dx * ct - dy * st;
197 yc[i] =
fY1 + dx * st + dy * ct;
200 for (i = 0; i <=
np; i++) {
204 xc[2 *
np - i + 1] =
fX1 + dx * ct - dy * st;
205 yc[2 *
np - i + 1] =
fY1 + dx * st + dy * ct;
207 xc[2 *
np + 2] = xc[0];
208 yc[2 *
np + 2] = yc[0];
232 for (i = 0; i <=
np; i++) {
236 x[i] =
fX1 + dx * ct - dy * st;
237 y[i] =
fY1 + dx * st + dy * ct;
240 for (i = 0; i <=
np; i++) {
244 x[2 *
np - i + 1] =
fX1 + dx * ct - dy * st;
245 y[2 *
np - i + 1] =
fY1 + dx * st + dy * ct;
247 x[2 *
np + 2] =
x[0];
248 y[2 *
np + 2] =
y[0];
252 gPad->PaintFillArea(2 *
np + 2,
x,
y);
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).
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t np
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint angle
Option_t Option_t TPoint TPoint const char y1
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
~TCrown() override
Crown default destructor.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a crown.
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="")
Draw this crown with new coordinates.
Double_t GetYXRatio() const
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
TCrown()
Crown default constructor.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
Int_t IsInside(Double_t x, Double_t y) const
Return 1 if the point (x,y) is inside the polygon defined by the crown 0 otherwise.
void Paint(Option_t *option="") override
Paint this crown with its current attributes.
void Copy(TObject &crown) const override
Copy this crown to crown.
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).
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.
TObject()
TObject constructor.
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_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.