source: trunk/Mars/mgeom/MGeomRectangle.h@ 19344

Last change on this file since 19344 was 10089, checked in by tbretz, 14 years ago
Added a new abstract function GetL() to MGeom.
File size: 1.0 KB
Line 
1#ifndef MARS_MGeomRectangle
2#define MARS_MGeomRectangle
3
4#ifndef MARS_MGeom
5#include "MGeom.h"
6#endif
7
8class MGeomRectangle : public MGeom
9{
10private:
11 Float_t fW;
12 Float_t fH;
13
14public:
15 MGeomRectangle(Float_t x=0, Float_t y=0, Float_t w=1, Float_t h=-1, UInt_t s=0, UInt_t aidx=0);
16
17 void Copy(TObject &obj) const
18 {
19 MGeomRectangle &pix = (MGeomRectangle&)obj;
20
21 pix.fW = fW;
22 pix.fH = fH;
23
24 MGeom::Copy(obj);
25 TObject::Copy(obj);
26 }
27
28 void SetSize(Float_t w, Float_t h=-1) { fW=w; fH=h<0?fW:h; fA=fW*fH; }
29
30 Float_t GetW() const { return fW; }
31 Float_t GetH() const { return fH; }
32 Float_t GetT() const;
33 Float_t GetL() const;
34
35 Bool_t IsInside(Float_t px, Float_t py) const;
36 void PaintPrimitive(const TAttLine &line, const TAttFill &fill, Double_t scalexy=1, Double_t scaled=1) const;
37
38 void Print(Option_t *opt=NULL) const;
39
40 ClassDef(MGeomRectangle, 1) // Geometry class describing the rectangular geometry of one pixel
41};
42
43#endif
Note: See TracBrowser for help on using the repository browser.