+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
// $Id$
+// $MpId: AliMpMotifPainter.cxx,v 1.7 2005/08/26 15:43:36 ivana Exp $
// Category: graphics
//
// Class AliMpMotifPainter
// -----------------------
// Class for drawing a motif into canvas
-//
+// Included in AliRoot: 2003/05/02
// Authors: David Guez, IPN Orsay
#include <TVirtualX.h>
: AliMpVPainter(),
fMotifPos(0)
{
- // default dummy constructor
+ /// Default constructor
}
//_______________________________________________________________________
: AliMpVPainter(),
fMotifPos(motifPos)
{
- // normal constructor
+ /// Standard constructor
}
//_____________________________________________________________________________
AliMpMotifPainter::AliMpMotifPainter(const AliMpMotifPainter& right)
- : AliMpVPainter(right) {
-//
+ : AliMpVPainter(right)
+{
+ /// Protected copy constructor (not provided)
+
Fatal("AliMpMotifPainter", "Copy constructor not provided.");
}
//_______________________________________________________________________
AliMpMotifPainter::~AliMpMotifPainter()
{
- // default dummy constructor
+ /// Default constructor
}
//_____________________________________________________________________________
AliMpMotifPainter&
AliMpMotifPainter::operator=(const AliMpMotifPainter& right)
{
- // check assignement to self
+ /// Assignment operator (not provided)
+
+ // check assignment to self
if (this == &right) return *this;
- Fatal("operator =", "Assignement operator not provided.");
+ Fatal("operator =", "Assignment operator not provided.");
return *this;
}
//_______________________________________________________________________
void AliMpMotifPainter::DumpObject()
{
-// Draw the owned object
- fMotifPos->Dump();
+/// Dump the owned object
+ fMotifPos->Dump();
}
//_______________________________________________________________________
TVector2 AliMpMotifPainter::GetPosition() const
{
-// Get the owned object's position
- return fMotifPos->Position();
+/// Get the owned object's position
+ return fMotifPos->Position();
}
+
//_______________________________________________________________________
TVector2 AliMpMotifPainter::GetDimensions() const
{
-// Get the owned object's dimensions
- return fMotifPos->Dimensions();
+/// Get the owned object's dimensions
+ return fMotifPos->Dimensions();
}
//_______________________________________________________________________
void AliMpMotifPainter::Paint(Option_t *option)
{
-// Paint the object
+/// Paint the object
+
AliMpGraphContext *gr = AliMpGraphContext::Instance();
if (!fMotifPos) return;
Int_t col=gVirtualX->GetFillColor();
if (option[1]=='T'){
Float_t textSize = gVirtualX->GetTextSize();
gVirtualX->SetTextSize(10);
- gPad->PaintText(padPadPos.X()-0.01,padPadPos.Y()-0.01,
+ gVirtualX->SetTextAlign(22);
+ // gPad->PaintText(padPadPos.X()-0.01,padPadPos.Y()-0.01,
+ gPad->PaintText((bl.X()+ur.X())/2.0,(bl.Y()+ur.Y())/2.0,
Form("%d",connect->GetGassiNum()));
gVirtualX->SetTextSize(textSize);