]>
Commit | Line | Data |
---|---|---|
0145e89a | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | // $Id$ | |
17 | ||
18 | #include "AliMUONPainterHighlighter.h" | |
19 | ||
20 | #include "AliMUONVPainter.h" | |
0145e89a | 21 | #include "AliLog.h" |
22 | ||
23 | /// \class AliMUONPainterHighlighter | |
24 | /// | |
25 | /// A special painter which highlights another one. | |
26 | /// Highlighting is currently a bold yellow outline of the relevant painter | |
27 | /// | |
28 | /// \author Laurent Aphecetche, Subatech | |
29 | /// | |
30 | ||
31 | ///\cond CLASSIMP | |
32 | ClassImp(AliMUONPainterHighlighter) | |
33 | ///\endcond | |
34 | ||
35 | //_____________________________________________________________________________ | |
36 | AliMUONPainterHighlighter::AliMUONPainterHighlighter() | |
37 | : TObject(), fPainter(0x0), fX(FLT_MAX), fY(FLT_MAX) | |
38 | { | |
39 | /// ctor | |
40 | } | |
41 | ||
42 | //_____________________________________________________________________________ | |
43 | AliMUONPainterHighlighter::~AliMUONPainterHighlighter() | |
44 | { | |
45 | /// dtor | |
46 | } | |
47 | ||
48 | //_____________________________________________________________________________ | |
49 | void | |
50 | AliMUONPainterHighlighter::SetPainter(AliMUONVPainter* painter, Double_t x, Double_t y) | |
51 | { | |
52 | /// Set the painte we should highlight | |
53 | ||
54 | AliDebug(1,Form("painter=%s x=%e y=%e",(painter ? painter->GetName() : ""),x,y)); | |
55 | fPainter = painter; | |
56 | fX = x; | |
57 | fY = y; | |
58 | } | |
59 | ||
60 | //_____________________________________________________________________________ | |
61 | void | |
62 | AliMUONPainterHighlighter::Paint(Option_t*) | |
63 | { | |
64 | /// Actually highlight our painter, if we have one | |
65 | if ( fPainter ) | |
66 | { | |
67 | AliDebug(1,Form("painter=%s fX=%e fY=%e",fPainter->GetName(),fX,fY)); | |
68 | fPainter->PaintOutline(5,5,fX,fY); | |
69 | } | |
70 | } |