85 marker.TMarker::Copy(*
this);
107 text.SetTextFont(62);
108 text.SetTextAlign(22);
109 text.SetTextSize(0.1);
113 for (
Int_t i=1;i<16;i++) {
119 atext.
Form(
"%d",i+19);
123 atext.
Form(
"%d",i+34);
138 text.SetTextFont(62);
139 text.SetTextAlign(22);
140 text.SetTextSize(0.075);
144 for (
Int_t i=1;i<19;i++) {
146 atext.
Form(
"%d",i+49);
150 atext.
Form(
"%d",i+67);
154 atext.
Form(
"%d",i+85);
158 atext.
Form(
"%d",i+103);
177 if (!
gPad)
return 9999;
180 pxm =
gPad->UtoAbsPixel(
fX);
181 pym =
gPad->VtoAbsPixel(
fY);
190 if (dist <= markerRadius)
return 0;
191 if (dist > markerRadius+3)
return 999;
225 if (!
gPad || !
gPad->IsEditable())
return;
227 auto &parent = *
gPad;
229 static Int_t pxold, pyold;
230 Bool_t opaque = parent.OpaqueMoving();
234 if ((posx != -1111) || (posy != -1111) || !paint) {
235 x = parent.AbsPixeltoX(posx);
236 y = parent.AbsPixeltoY(posy);
239 x = parent.GetX1() +
GetX() * (parent.GetX2() - parent.GetX1());
240 y = parent.GetY1() +
GetY() * (parent.GetY2() - parent.GetY1());
242 x = parent.XtoPad(
GetX());
243 y = parent.YtoPad(
GetY());
246 auto pp = parent.GetPainter();
247 pp->SetAttMarker(*
this);
248 pp->DrawPolyMarker(1, &
x, &
y);
250 SetX((
x - parent.GetX1()) / (parent.GetX2() - parent.GetX1()));
251 SetY((
y - parent.GetY1()) / (parent.GetY2() - parent.GetY1()));
253 SetX(parent.PadtoX(
x));
254 SetY(parent.PadtoY(
y));
262 pxold = pyold = -1111;
263 parent.SetCursor(
kMove);
268 action(
false, px, py);
269 parent.ShowGuidelines(
this, event,
'i',
true);
270 parent.ModifiedUpdate();
272 action(
true, pxold, pyold);
273 action(
true, px, py);
274 pxold = px; pyold = py;
280 parent.ShowGuidelines(
this, event);
282 action(
false, px, py);
283 parent.ModifiedUpdate();
334 printf(
"Marker X=%f Y=%f",
fX,
fY);
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
unsigned short UShort_t
Unsigned Short integer 2 bytes (unsigned short).
int Int_t
Signed integer 4 bytes (int).
short Version_t
Class version identifier (short).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
long long Long64_t
Portable signed long integer 8 bytes.
float Float_t
Float 4 bytes (float).
const char Option_t
Option string (const char).
Abstract base class for elements drawn in the editor.
Double_t GetYCoord(const Int_t y, Bool_t is_ndc=kFALSE)
Double_t GetXCoord(const Int_t x, Bool_t is_ndc=kFALSE)
virtual Style_t GetMarkerStyle() const
Return the marker style.
virtual Color_t GetMarkerColor() const
Return the marker color.
virtual Size_t GetMarkerSize() const
Return the marker size.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
void Copy(TAttMarker &attmarker) const
virtual void Streamer(TBuffer &)
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
Size_t fMarkerSize
Marker size.
Style_t fMarkerStyle
Marker style.
virtual void SaveMarkerAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1)
Buffer base class used for serializing objects.
virtual Version_t ReadVersion(UInt_t *start=nullptr, UInt_t *bcnt=nullptr, const TClass *cl=nullptr)=0
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
void Streamer(TBuffer &) override
Stream an object of class TMarker.
Double_t fX
X position of marker (left,center,etc..).
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
void ls(Option_t *option="") const override
List this marker with its attributes.
virtual void SetX(Double_t x)
void SetBBoxCenterY(const Int_t y) override
Set Y coordinate of the center of the BoundingBox.
virtual void SetNDC(Bool_t isNDC=kTRUE)
Set NDC mode on if isNDC = kTRUE, off otherwise.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
void Draw(Option_t *option="") override
Draw this marker with its current attributes.
~TMarker() override
Marker default destructor.
TMarker()
Marker default constructor.
Double_t fY
Y position of marker (left,center,etc..).
virtual void SetY(Double_t y)
void SetBBoxCenterX(const Int_t x) override
Set X coordinate of the center of the BoundingBox.
void SetBBoxY1(const Int_t y) override
Set top of BoundingBox to a value (resize in y direction on top).
void SetBBoxY2(const Int_t y) override
Set bottom of BoundingBox to a value (resize in y direction on bottom).
void Copy(TObject &marker) const override
Copy this marker to marker.
void Paint(Option_t *option="") override
Paint this marker with its current attributes.
virtual TMarker * DrawMarker(Double_t x, Double_t y)
Draw this marker with new coordinates.
virtual void PaintMarker(Double_t x, Double_t y)
Draw this marker with new coordinates.
Rectangle_t GetBBox() override
Return the bounding Box of the marker.
void SetBBoxX1(const Int_t x) override
Set left hand side of BoundingBox to a value (resize in x direction on left).
static void DisplayMarkerLineWidths()
Display the table of markers with different line widths and their numbers.
void Print(Option_t *option="") const override
Dump this marker with its attributes.
@ kMarkerNDC
Marker position is in NDC.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a marker.
void SetBBoxX2(const Int_t x) override
Set right hand side of BoundingBox to a value (resize in x direction on right).
static void DisplayMarkerTypes()
Display the table of markers with their numbers.
virtual void PaintMarkerNDC(Double_t u, Double_t v)
Draw this marker with new coordinates in NDC.
Bool_t TestBit(UInt_t f) const
virtual void Streamer(TBuffer &)
Stream an object of class TObject.
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.
virtual void Copy(TObject &object) const
Copy this to obj.
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 void IndentLevel()
Functions used by ls() to indent an object hierarchy.
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Double_t Sqrt(Double_t x)
Returns the square root of x.
Rectangle structure (maps to the X11 XRectangle structure).