102 arrow.TArrow::Copy(*
this);
144 if (!opt || !opt[0]) opt =
"|>";
183 gPad->GetPadPar(x1p,y1p,x2p,y2p);
188 if (ix1==ix2||iy1==iy2)
return;
208 gPad->GetRange(rx1,ry1,rx2,ry2);
209 Double_t rx = (x2ndc-x1ndc)/(rx2-rx1);
210 Double_t ry = (y2ndc-y1ndc)/(ry2-ry1);
230 x1ar[0] = x1n-sinT*dSize;
231 y1ar[0] = y1n+cosT*dSize;
232 x1ar[1] = x1n+sinT*dSize;
233 y1ar[1] = y1n-cosT*dSize;
235 for (
Int_t i=0; i<2; i++) {
236 x1ar[i] = (1/rx)*(x1ar[i]-x1ndc)+rx1;
237 y1ar[i] = (1/ry)*(y1ar[i]-y1ndc)+ry1;
239 gPad->PaintLine(x1ar[0],y1ar[0],x1ar[1],y1ar[1]);
244 x2ar[0] = x2n-sinT*dSize;
245 y2ar[0] = y2n+cosT*dSize;
246 x2ar[1] = x2n+sinT*dSize;
247 y2ar[1] = y2n-cosT*dSize;
249 for (
Int_t i=0; i<2; i++) {
250 x2ar[i] = (1/rx)*(x2ar[i]-x1ndc)+rx1;
251 y2ar[i] = (1/ry)*(y2ar[i]-y1ndc)+ry1;
253 gPad->PaintLine(x2ar[0],y2ar[0],x2ar[1],y2ar[1]);
254 opt(opt.
Length()-1) =
' ';
263 x2h = xm + cosT*rSize/2;
264 y2h = ym + sinT*rSize/2;
267 x1h = xm - cosT*rSize/2;
268 y1h = ym - sinT*rSize/2;
280 x1n = (1/rx)*(x1n-x1ndc)+rx1;
281 y1n = (1/ry)*(y1n-y1ndc)+ry1;
282 x2n = (1/rx)*(x2n-x1ndc)+rx1;
283 y2n = (1/ry)*(y2n-y1ndc)+ry1;
284 gPad->PaintLine(x1n,y1n,x2n,y2n);
290 x2ar[0] = x2h - rSize*cosT - sinT*dSize;
291 y2ar[0] = y2h - rSize*sinT + cosT*dSize;
294 x2ar[2] = x2h - rSize*cosT + sinT*dSize;
295 y2ar[2] = y2h - rSize*sinT - cosT*dSize;
300 for (
Int_t i=0; i<4; i++) {
301 x2ar[i] = (1/rx)*(x2ar[i]-x1ndc)+rx1;
302 y2ar[i] = (1/ry)*(y2ar[i]-y1ndc)+ry1;
308 gPad->PaintFillArea(3,x2ar,y2ar);
309 gPad->PaintPolyLine(4,x2ar,y2ar);
311 gPad->PaintPolyLine(4,x2ar,y2ar);
314 gPad->PaintPolyLine(3,x2ar,y2ar);
320 x1ar[0] = x1h + rSize*cosT + sinT*dSize;
321 y1ar[0] = y1h + rSize*sinT - cosT*dSize;
324 x1ar[2] = x1h + rSize*cosT - sinT*dSize;
325 y1ar[2] = y1h + rSize*sinT + cosT*dSize;
330 for (
Int_t i=0; i<4; i++) {
331 x1ar[i] = (1/rx)*(x1ar[i]-x1ndc)+rx1;
332 y1ar[i] = (1/ry)*(y1ar[i]-y1ndc)+ry1;
338 gPad->PaintFillArea(3,x1ar,y1ar);
339 gPad->PaintPolyLine(4,x1ar,y1ar);
341 gPad->PaintPolyLine(4,x1ar,y1ar);
344 gPad->PaintPolyLine(3,x1ar,y1ar);
373 out<<
"arrow = new TArrow("<<
fX1<<
","<<
fY1<<
","<<
fX2<<
","<<
fY2
380 out<<
" arrow->SetNDC();"<<std::endl;
383 out <<
" arrow->SetAngle(" <<
GetAngle() <<
");" << std::endl;
385 out<<
" arrow->Draw();"<<std::endl;
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
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 winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h length
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t SetFillColor
Option_t Option_t TPoint TPoint const char y1
R__EXTERN TVirtualPS * gVirtualPS
Draw all kinds of Arrows.
Option_t * GetOption() const override
static Float_t GetDefaultAngle()
Get default angle.
Float_t fArrowSize
Arrow Size.
static void SetDefaultOption(Option_t *Option)
Set default option.
static void SetDefaultArrowSize(Float_t ArrowSize)
Set default arrow sive.
static void SetDefaultAngle(Float_t Angle)
Set default angle.
static Float_t fgDefaultAngle
Default Arrow opening angle (degrees)
static Option_t * GetDefaultOption()
Get default option.
static Float_t fgDefaultArrowSize
Default Arrow Size.
virtual TArrow * DrawArrow(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Float_t arrowsize=0, Option_t *option="")
Draw this arrow with new coordinates.
void Paint(Option_t *option="") override
Paint this arrow with its current attributes.
TArrow()
Arrow default constructor.
virtual ~TArrow()
Arrow default destructor.
Float_t fAngle
Arrow opening angle (degrees)
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
static TString fgDefaultOption
Default Arrow shapes.
TString fOption
Arrow shapes.
virtual void PaintArrowNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2, Float_t arrowsize=0.05, Option_t *option=">")
Draw this arrow with new coordinates in NDC.
void Draw(Option_t *option="") override
Draw this arrow with its current attributes.
virtual void PaintArrow(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Float_t arrowsize=0.05, Option_t *option=">")
Draw this arrow with new coordinates.
virtual void SetAngle(Float_t angle=60)
static Float_t GetDefaultArrowSize()
Get default arrow size.
void Copy(TObject &arrow) const override
Copy this arrow to arrow.
Fill Area Attributes class.
virtual Color_t GetFillColor() const
Return the fill area color.
void Copy(TAttFill &attfill) const
Copy this fill attributes to a new TAttFill.
virtual void Modify()
Change current fill area attributes if necessary.
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
Save fill attributes as C++ statement(s) on output stream out.
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual void Modify()
Change current line attributes if necessary.
void Copy(TAttLine &attline) const
Copy this line attributes to a new TAttLine.
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
Save line attributes as C++ statement(s) on output stream out.
Use the TLine constructor to create a simple line.
Double_t fY1
Y of 1st point.
Double_t fX1
X of 1st point.
void Copy(TObject &line) const override
Copy this line to line.
Double_t fX2
X of 2nd point.
@ kLineNDC
Use NDC coordinates.
Double_t fY2
Y of 2nd point.
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
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.
@ kCanDelete
if object in a list can be deleted
void ToLower()
Change string to lower-case.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Double_t Sqrt(Double_t x)
Returns the square root of x.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Double_t Tan(Double_t)
Returns the tangent of an angle of x radians.