]>
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" | |
21 | #include "AliMUONPainterContour.h" | |
22 | #include "AliLog.h" | |
23 | ||
24 | /// \class AliMUONPainterHighlighter | |
25 | /// | |
26 | /// A special painter which highlights another one. | |
27 | /// Highlighting is currently a bold yellow outline of the relevant painter | |
28 | /// | |
29 | /// \author Laurent Aphecetche, Subatech | |
30 | /// | |
31 | ||
32 | ///\cond CLASSIMP | |
33 | ClassImp(AliMUONPainterHighlighter) | |
34 | ///\endcond | |
35 | ||
36 | //_____________________________________________________________________________ | |
37 | AliMUONPainterHighlighter::AliMUONPainterHighlighter() | |
38 | : TObject(), fPainter(0x0), fX(FLT_MAX), fY(FLT_MAX) | |
39 | { | |
40 | /// ctor | |
41 | } | |
42 | ||
43 | //_____________________________________________________________________________ | |
44 | AliMUONPainterHighlighter::~AliMUONPainterHighlighter() | |
45 | { | |
46 | /// dtor | |
47 | } | |
48 | ||
49 | //_____________________________________________________________________________ | |
50 | void | |
51 | AliMUONPainterHighlighter::SetPainter(AliMUONVPainter* painter, Double_t x, Double_t y) | |
52 | { | |
53 | /// Set the painte we should highlight | |
54 | ||
55 | AliDebug(1,Form("painter=%s x=%e y=%e",(painter ? painter->GetName() : ""),x,y)); | |
56 | fPainter = painter; | |
57 | fX = x; | |
58 | fY = y; | |
59 | } | |
60 | ||
61 | //_____________________________________________________________________________ | |
62 | void | |
63 | AliMUONPainterHighlighter::Paint(Option_t*) | |
64 | { | |
65 | /// Actually highlight our painter, if we have one | |
66 | if ( fPainter ) | |
67 | { | |
68 | AliDebug(1,Form("painter=%s fX=%e fY=%e",fPainter->GetName(),fX,fY)); | |
69 | fPainter->PaintOutline(5,5,fX,fY); | |
70 | } | |
71 | } |