34 #include <TVirtualX.h> 77 TVector2 point = TVector2(gPad->AbsPixeltoX(x), gPad->AbsPixeltoY(y));
89 Double_t value = (point-pos).Mod();
90 if (value<res) res=value;
200 default: AppendPad(option);
215 gPad->Range(0.,0.,1.,1.);
216 Int_t col=gVirtualX->GetFillColor();
219 gVirtualX->SetFillColor(
GetColor());
226 gPad->PaintBox(pos.X()-dim.X(),pos.Y()-dim.Y(),
227 pos.X()+dim.X(),pos.Y()+dim.Y());
229 Float_t textSize = gVirtualX->GetTextSize();
230 gVirtualX->SetTextSize(15);
231 gPad->PaintText(pos.X()-0.01,pos.Y()-0.01,
233 gVirtualX->SetTextSize(textSize);
237 gVirtualX->SetFillColor(col);
virtual ~AliMpSubZonePainter()
virtual Double_t GetDimensionX() const =0
Return the x dimension of the row segment centre.
AliMpVMotif * GetMotif() const
virtual void DumpObject()
Int_t GetColor() const
Return the color.
virtual TVector2 GetDimensions() const
Return the owned object's dimensions.
Int_t GetNofRowSegments() const
static AliMpGraphContext * Instance()
virtual Int_t DistancetoPrimitive(Int_t x, Int_t y)
void SetPadPosForReal(const TVector2 &position, const TVector2 &dimensions)
virtual TVector2 GetPosition() const
Return the owned object's position.
void SetColor(Int_t color)
Set color to use.
Bool_t IsInside(const TVector2 &point, const TVector2 &pos, const TVector2 &dim)
An interface for a row segment.
TString GetID() const
Return the motif identifier.
AliMpSubZone * fSubZone
the subzone to draw
virtual Double_t GetPositionX() const =0
Return the x position of the row segment centre.
virtual void Paint(Option_t *option)
Paint the associated object.
virtual Double_t GetPositionY() const =0
Return the y position of the row segment centre.
Abstract base class for drawing objects into canvas.
virtual Double_t GetDimensionY() const =0
Return the y dimension of the row segment centre.
virtual void Draw(Option_t *option)
AliMpVPainter * DrawObject(TObject *object, Option_t *option="")
Not implemented.
TVector2 RealToPad(const TVector2 &position) const
Class describing the correspondance between a given area in pad, and a zone of real (cm) position...
Class for drawing a subzone into canvas.
AliMpVRowSegment * GetRowSegment(Int_t i) const
A region in zone composed of the row segments with the same motif type.