AliRoot Core  edcc906 (edcc906)
AliMpVPainter Class Referenceabstract

Abstract base class for drawing objects into canvas. More...

#include <AliMpVPainter.h>

Inheritance diagram for AliMpVPainter:

Public Member Functions

 AliMpVPainter ()
 
virtual ~AliMpVPainter ()
 
void DumpObject () const
 
virtual void Paint (Option_t *option)=0
 Paint the associated object. More...
 
virtual TObject * Clone (const char *newname="") const
 
virtual TObject * DrawClone (Option_t *option) const
 
TVector2 GetPadPosition () const
 Return the position inside the graphics pad. More...
 
TVector2 GetPadDimensions () const
 Return the dimensions inside the graphics pad. More...
 
Int_t GetColor () const
 Return the color. More...
 
void SetPadPosition (const TVector2 &padPosition)
 Set the position inside the graphics pad. More...
 
void SetPadDimension (const TVector2 &padDimensions)
 Set the dimensions inside the graphics pad. More...
 
void SetColor (Int_t color)
 Set the color. More...
 
Bool_t IsInside (const TVector2 &point, const TVector2 &pos, const TVector2 &dim)
 
virtual TVector2 GetPosition () const =0
 Return the owned object's position. More...
 
virtual TVector2 GetDimensions () const =0
 Return the owned object's dimensions. More...
 
void InitGraphContext ()
 
void PaintWholeBox (Bool_t fill=kTRUE, Bool_t center=kFALSE)
 
virtual Int_t DistancetoPrimitive (Int_t x, Int_t y)
 
TVector2 RealToPad (const TVector2 &realPos)
 

Static Public Member Functions

static AliMpVPainterCreatePainter (TObject *object)
 

Protected Member Functions

void AddPainter (AliMpVPainter *painter)
 Not implemented. More...
 
AliMpVPainterDrawObject (TObject *object, Option_t *option="")
 Not implemented. More...
 

Private Member Functions

 AliMpVPainter (const AliMpVPainter &right)
 Not implemented. More...
 
AliMpVPainteroperator= (const AliMpVPainter &right)
 Not implemented. More...
 

Private Attributes

Int_t fColor
 color More...
 
TVector2 fPadPosition
 position inside the graphics pad More...
 
TVector2 fPadDimensions
 dimensions inside the graphics pad More...
 
TList * fTrashList
 list of painter object created More...
 

Detailed Description

Abstract base class for drawing objects into canvas.

Author
David Guez, IPN Orsay

Definition at line 21 of file AliMpVPainter.h.

Constructor & Destructor Documentation

AliMpVPainter::AliMpVPainter ( )

Default constructor

Definition at line 63 of file AliMpVPainter.cxx.

Referenced by SetColor().

AliMpVPainter::~AliMpVPainter ( )
virtual

Destructor

Definition at line 80 of file AliMpVPainter.cxx.

AliMpVPainter::AliMpVPainter ( const AliMpVPainter right)
private

Not implemented.

Member Function Documentation

void AliMpVPainter::AddPainter ( AliMpVPainter painter)
protected

Not implemented.

Add a painter to the list of painters (private)

Definition at line 203 of file AliMpVPainter.cxx.

Referenced by DrawObject(), and SetColor().

TObject * AliMpVPainter::Clone ( const char *  newname = "") const
virtual

Create a clone of this object

Definition at line 119 of file AliMpVPainter.cxx.

Referenced by DrawClone().

AliMpVPainter * AliMpVPainter::CreatePainter ( TObject *  object)
static

Create a new painter, which correspond to the class of object

Definition at line 150 of file AliMpVPainter.cxx.

Referenced by DrawObject(), AliMpDEVisu::DrawQuadrant(), AliMpDEVisu::DrawSlat(), AliMpDEVisu::PopUpManuMotif(), AliMpDEVisu::PopUpZoom(), and SetColor().

Int_t AliMpVPainter::DistancetoPrimitive ( Int_t  x,
Int_t  y 
)
virtual

Distance to the center if (x,y) is inside the box defined by (fPadPosition,fPadDimensions) 9999 otherwise

Reimplemented in AliMpZonePainter, and AliMpSubZonePainter.

Definition at line 99 of file AliMpVPainter.cxx.

Referenced by SetColor().

TObject * AliMpVPainter::DrawClone ( Option_t *  option) const
virtual

Draw the clone object

Definition at line 132 of file AliMpVPainter.cxx.

AliMpVPainter * AliMpVPainter::DrawObject ( TObject *  object,
Option_t *  option = "" 
)
protected
void AliMpVPainter::DumpObject ( ) const

Dump the painted object

Definition at line 113 of file AliMpVPainter.cxx.

Int_t AliMpVPainter::GetColor ( ) const
inline
virtual TVector2 AliMpVPainter::GetDimensions ( ) const
pure virtual
TVector2 AliMpVPainter::GetPadDimensions ( ) const
inline

Return the dimensions inside the graphics pad.

Definition at line 39 of file AliMpVPainter.h.

TVector2 AliMpVPainter::GetPadPosition ( ) const
inline

Return the position inside the graphics pad.

Definition at line 37 of file AliMpVPainter.h.

Referenced by AliMpRowPainter::Paint(), and AliMpMotifPainter::Paint().

virtual TVector2 AliMpVPainter::GetPosition ( ) const
pure virtual
Bool_t AliMpVPainter::IsInside ( const TVector2 &  point,
const TVector2 &  pos,
const TVector2 &  dim 
)

Is the point point inside the area (pos,dim)?

Definition at line 91 of file AliMpVPainter.cxx.

Referenced by AliMpSubZonePainter::DistancetoPrimitive(), AliMpZonePainter::DistancetoPrimitive(), DistancetoPrimitive(), and SetColor().

AliMpVPainter& AliMpVPainter::operator= ( const AliMpVPainter right)
private

Not implemented.

Referenced by SetColor().

virtual void AliMpVPainter::Paint ( Option_t *  option)
pure virtual
void AliMpVPainter::PaintWholeBox ( Bool_t  fill = kTRUE,
Bool_t  center = kFALSE 
)

Paint the box around the total pad area given in this painter fill it or bnot following the parameter value

Definition at line 251 of file AliMpVPainter.cxx.

Referenced by AliMpPCBPainter::Paint(), AliMpRowSegmentPainter::Paint(), AliMpRowPainter::Paint(), AliMpMotifPainter::Paint(), AliMpSlatPainter::Paint(), and SetColor().

TVector2 AliMpVPainter::RealToPad ( const TVector2 &  realPos)

Transform a real position into its equivalent position in a canvas

Definition at line 277 of file AliMpVPainter.cxx.

Referenced by SetColor().

void AliMpVPainter::SetColor ( Int_t  color)
inline

Set the color.

Definition at line 51 of file AliMpVPainter.h.

void AliMpVPainter::SetPadDimension ( const TVector2 &  padDimensions)
inline

Set the dimensions inside the graphics pad.

Definition at line 49 of file AliMpVPainter.h.

void AliMpVPainter::SetPadPosition ( const TVector2 &  padPosition)
inline

Set the position inside the graphics pad.

Definition at line 47 of file AliMpVPainter.h.

Member Data Documentation

Int_t AliMpVPainter::fColor
private

color

Definition at line 80 of file AliMpVPainter.h.

Referenced by GetColor(), InitGraphContext(), and SetColor().

TVector2 AliMpVPainter::fPadDimensions
private

dimensions inside the graphics pad

Definition at line 82 of file AliMpVPainter.h.

Referenced by Clone(), DistancetoPrimitive(), GetPadDimensions(), InitGraphContext(), PaintWholeBox(), RealToPad(), and SetPadDimension().

TVector2 AliMpVPainter::fPadPosition
private

position inside the graphics pad

Definition at line 81 of file AliMpVPainter.h.

Referenced by Clone(), DistancetoPrimitive(), GetPadPosition(), InitGraphContext(), PaintWholeBox(), RealToPad(), and SetPadPosition().

TList* AliMpVPainter::fTrashList
private

list of painter object created

Definition at line 83 of file AliMpVPainter.h.

Referenced by AddPainter(), and ~AliMpVPainter().


The documentation for this class was generated from the following files: