source: trunk/MagicSoft/Mars/mgeom/MGeomRectangle.h@ 9462

Last change on this file since 9462 was 9385, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 998 bytes
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
34 Bool_t IsInside(Float_t px, Float_t py) const;
35 void PaintPrimitive(const TAttLine &line, const TAttFill &fill, Double_t scalexy=1, Double_t scaled=1) const;
36
37 void Print(Option_t *opt=NULL) const;
38
39 ClassDef(MGeomRectangle, 1) // Geometry class describing the rectangular geometry of one pixel
40};
41
42#endif
Note: See TracBrowser for help on using the repository browser.