Changeset 959 for trunk/MagicSoft/Mars/mgui
- Timestamp:
- 10/02/01 14:46:56 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/mgui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mgui/MCamDisplay.cc
r859 r959 12 12 #include "MGeomCam.h" 13 13 14 #include "MCerPhotEvt.h" 14 #include "MCerPhotEvt.h" 15 15 16 16 #define kITEMS_LEGEND 25 17 17 18 ClassImp(MCamDisplay) 19 20 MCamDisplay::MCamDisplay (MGeomCam *geom) : fAutoScale(kTRUE) 21 { 22 // default constructor 23 18 ClassImp(MCamDisplay); 19 20 // ------------------------------------------------------------------------ 21 // 22 // default constructor 23 // 24 MCamDisplay::MCamDisplay(MGeomCam *geom) : fAutoScale(kTRUE) 25 { 24 26 // 25 27 // set the color palette 26 28 // 27 gStyle->SetPalette(1, 0);29 gStyle->SetPalette(1, 0); 28 30 29 31 // 30 32 // create the hexagons of the display 31 33 // 32 fNumPixels = geom->GetNumPixels() 33 fPixels = new TClonesArray("MHexagon", fNumPixels );34 35 for (UInt_t i=0; i< fNumPixels; i++)36 (*fPixels)[i] = new MHexagon((*geom)[i]) 34 fNumPixels = geom->GetNumPixels(); 35 fPixels = new TClonesArray("MHexagon", fNumPixels); 36 37 for (UInt_t i=0; i<fNumPixels; i++) 38 (*fPixels)[i] = new MHexagon((*geom)[i]); 37 39 38 40 // 39 41 // set the range to default 40 42 // 41 fMinPhe = -2.;42 fMaxPhe = 50.;43 fMinPhe = -2.; 44 fMaxPhe = 50.; 43 45 44 46 // 45 47 // set up the Legend 46 48 // 47 fLegend = new TClonesArray("TBox", kITEMS_LEGEND );48 fLegText = new TClonesArray("TText", kITEMS_LEGEND );49 50 char text[10] 51 for ( Int_t il = 0 ; il < kITEMS_LEGEND ; il++)49 fLegend = new TClonesArray("TBox", kITEMS_LEGEND); 50 fLegText = new TClonesArray("TText", kITEMS_LEGEND); 51 52 char text[10]; 53 for (Int_t il = 0; il<kITEMS_LEGEND; il++) 52 54 { 53 55 const Int_t y = il*40; 54 56 55 TBox *newbox = new TBox (650, y-500, 700, y-460 56 TText *newtxt = new TText(720, y-480, text 57 TBox *newbox = new TBox (650, y-500, 700, y-460); 58 TText *newtxt = new TText(720, y-480, text); 57 59 58 60 const Float_t lvl = 50. / kITEMS_LEGEND * il; 59 61 60 newbox->SetFillColor( GetColor(lvl));61 62 sprintf ( text, "%5.1f", lvl );63 64 newtxt->SetTextSize (0.025);65 newtxt->SetTextAlign(12) 62 newbox->SetFillColor(GetColor(lvl)); 63 64 sprintf(text, "%5.1f", lvl); 65 66 newtxt->SetTextSize(0.025); 67 newtxt->SetTextAlign(12); 66 68 67 69 (*fLegend) [il] = newbox; … … 70 72 } 71 73 72 MCamDisplay::~MCamDisplay() 73 { 74 delete fPixels ; 75 } 76 77 78 void MCamDisplay::Init() 79 { 80 // 81 // Set the right colors 82 83 gStyle->SetPalette(1, 0) ; 84 74 // ------------------------------------------------------------------------ 75 // 76 // 77 MCamDisplay::~MCamDisplay() 78 { 79 delete fPixels; 80 } 81 82 // ------------------------------------------------------------------------ 83 // 84 // 85 void MCamDisplay::Draw(Option_t *option) 86 { 85 87 // 86 88 // if no canvas is yet existing to draw into, create a new one 87 89 // 88 if (!gPad) new TCanvas("display", "MAGIC display", 0, 0, 650, 500); 89 90 // 91 // draw all pixels of the camera 90 if (!gPad) 91 new TCanvas("CamDisplay", "Magic Camera Display", 0, 0, 650, 500); 92 else 93 gPad->Clear(); 94 95 // 96 // Setup the correct environment 97 // 98 gStyle->SetPalette(1, 0); 99 100 gPad->Range(-600, -600, 900, 600); 101 gPad->SetFillColor(22); 102 103 // 104 // Draw all pixels of the camera 105 // (means apend all pixelobjects to the current pad) 92 106 // 93 107 for (UInt_t i=0; i<fNumPixels; i++) … … 102 116 GetText(i)->Draw(); 103 117 } 104 } 105 106 107 void MCamDisplay::Draw(Option_t *option ) 108 { 109 // 110 111 // 112 // check if there a pad exists, if not create one 113 // 114 if ( !gPad ) Init() ; 115 116 // 117 // set init values 118 // 119 gPad->Range (-600, -600, 900, 600) ; 120 gPad->SetFillColor(22) ; 121 122 // 123 // mark pad as modified and update screen 124 // 125 gPad->Modified() ; 126 gPad->Update() ; 127 } 128 129 void MCamDisplay::DrawPhotNum( MCerPhotEvt *event) 118 } 119 120 // ------------------------------------------------------------------------ 121 // 122 // 123 void MCamDisplay::DrawPhotNum(const MCerPhotEvt *event) 130 124 { 131 125 … … 134 128 // determine the Pixel Id and the content 135 129 // 136 Reset() 130 Reset(); 137 131 138 132 // … … 140 134 // each event 141 135 // 142 if ( fAutoScale)143 { 144 fMinPhe = event->GetNumPhotonsMin() 145 fMaxPhe = event->GetNumPhotonsMax() 136 if (fAutoScale) 137 { 138 fMinPhe = event->GetNumPhotonsMin(); 139 fMaxPhe = event->GetNumPhotonsMax(); 146 140 147 141 if (fMaxPhe < 20.) 148 fMaxPhe = 20. 149 150 UpdateLegend() 142 fMaxPhe = 20.; 143 144 UpdateLegend(); 151 145 } 152 146 … … 156 150 const Int_t entries = event->GetNumPixels(); 157 151 158 for (Int_t i=0 ; i<entries; i++)152 for (Int_t i=0; i<entries; i++) 159 153 { 160 154 MCerPhotPix &pix = (*event)[i]; … … 167 161 168 162 // 169 // update the picture 170 // 171 Draw() ; 172 } 173 174 void MCamDisplay::DrawPhotErr( MCerPhotEvt *event) 163 // Update display physically 164 // 165 gPad->Modified(); 166 gPad->Update(); 167 } 168 169 // ------------------------------------------------------------------------ 170 // 171 // 172 void MCamDisplay::DrawPhotErr(const MCerPhotEvt *event) 175 173 { 176 174 // 177 175 // reset the all pixel colors to a default value 178 176 // 179 Reset() 177 Reset(); 180 178 181 179 // … … 183 181 // determine the Pixel Id and the content 184 182 // 185 const Int_t entries = event->GetNumPixels() 186 187 for (Int_t i=0 ; i<entries; i++ 183 const Int_t entries = event->GetNumPixels(); 184 185 for (Int_t i=0 ; i<entries; i++) 188 186 { 189 187 MCerPhotPix &pix = (*event)[i]; … … 193 191 194 192 // 195 // update display 196 // 197 Draw() ; 198 } 199 200 201 void MCamDisplay::Reset() 202 { 203 // 204 // reset the all pixel colors to a default value 205 // 206 for ( UInt_t i=0 ; i< fNumPixels ; i++ ) 207 (*this)[i].SetFillColor(10) ; 193 // Update display physically 194 // 195 gPad->Modified(); 196 gPad->Update(); 197 } 198 199 200 // ------------------------------------------------------------------------ 201 // 202 // reset the all pixel colors to a default value 203 // 204 void MCamDisplay::Reset() 205 { 206 for (UInt_t i=0; i<fNumPixels; i++) 207 (*this)[i].SetFillColor(10); 208 208 } 209 209 210 // ------------------------------------------------------------------------ 211 // 212 // Here we calculate the color index for the current value. 213 // The color index is defined with the class TStyle and the 214 // Color palette inside. We use the command gStyle->SetPalette(1,0) 215 // for the display. So we have to convert the value "wert" into 216 // a color index that fits the color palette. 217 // The range of the color palette is defined by the values fMinPhe 218 // and fMaxRange. Between this values we have 50 color index, starting 219 // with 0 up to 49. 220 // 210 221 Int_t MCamDisplay::GetColor(Float_t val) 211 222 { 212 223 // 213 // Here we calculate the color index for the current value.214 // The color index is defined with the class TStyle and the215 // Color palette inside. We use the command gStyle->SetPalette(1,0)216 // for the display. So we have to convert the value "wert" into217 // a color index that fits the color palette.218 // The range of the color palette is defined by the values fMinPhe219 // and fMaxRange. Between this values we have 50 color index, starting220 // with 0 up to 49.221 //222 223 //224 224 // first treat the over- and under-flows 225 225 // 226 226 const Float_t maxcolidx = 49.0; 227 227 228 if (val >= fMaxPhe 228 if (val >= fMaxPhe) 229 229 return gStyle->GetColorPalette(maxcolidx); 230 230 231 if (val <= fMinPhe 232 return gStyle->GetColorPalette( 0);231 if (val <= fMinPhe) 232 return gStyle->GetColorPalette(0); 233 233 234 234 // … … 236 236 // 237 237 const Float_t ratio = (val-fMinPhe) / (fMaxPhe-fMinPhe); 238 const Int_t colidx = (Int_t)(maxcolidx*ratio + .5) 239 240 return gStyle->GetColorPalette(colidx) 241 } 242 243 void MCamDisplay::UpdateLegend() 244 { 245 // 246 // change the text on the legend according to the range of the 247 // Display 248 // 249 250 char text[10] 238 const Int_t colidx = (Int_t)(maxcolidx*ratio + .5); 239 240 return gStyle->GetColorPalette(colidx); 241 } 242 243 // ------------------------------------------------------------------------ 244 // 245 // change the text on the legend according to the range of the 246 // Display 247 // 248 void MCamDisplay::UpdateLegend() 249 { 250 char text[10]; 251 251 252 252 for (Int_t il=0; il < kITEMS_LEGEND; il++) … … 258 258 TText &txt = *GetText(il); 259 259 260 txt.SetText(txt.GetX(), txt.GetY(), text) 261 } 262 } 260 txt.SetText(txt.GetX(), txt.GetY(), text); 261 } 262 } -
trunk/MagicSoft/Mars/mgui/MCamDisplay.h
r715 r959 27 27 class MCamDisplay : public TObject 28 28 { 29 private: 30 29 private: 30 Bool_t fAutoScale; // indicating the autoscale function 31 31 32 33 TClonesArray *fPixels;32 UInt_t fNumPixels; 33 TClonesArray *fPixels; 34 34 35 36 35 Float_t fMinPhe; // The minimal number of Phe 36 Float_t fMaxPhe; // The maximum number of Phe 37 37 38 39 38 TClonesArray *fLegend; 39 TClonesArray *fLegText; 40 40 41 42 41 TBox *GetBox(Int_t i) { return (TBox*) fLegend->At(i); } 42 TText *GetText(Int_t i) { return (TText*)fLegText->At(i); } 43 43 44 45 46 47 44 void SetPixColor(MCerPhotPix &pix) 45 { 46 (*this)[pix.GetPixId()].SetFillColor( GetColor(pix.GetNumPhotons())); 47 } 48 48 49 49 public: … … 51 51 MCamDisplay (MGeomCam *geom); 52 52 53 ~MCamDisplay 53 ~MCamDisplay(); 54 54 55 void Init();55 void Draw(Option_t *option = ""); 56 56 57 void Draw(Option_t *option = "" ); 58 59 void DrawPhotNum( MCerPhotEvt *event); 60 void DrawPhotErr( MCerPhotEvt *event); 57 void DrawPhotNum(const MCerPhotEvt *event); 58 void DrawPhotErr(const MCerPhotEvt *event); 61 59 62 60 void Reset(); … … 64 62 MHexagon &operator[](int i) { return *((MHexagon*)fPixels->At(i)); } 65 63 66 Int_t GetColor( Float_t wert);64 Int_t GetColor(Float_t wert); 67 65 68 66 void UpdateLegend(); 69 67 70 void SetAutoScale (Bool_t input = kTRUE)68 void SetAutoScale(Bool_t input = kTRUE) 71 69 { 72 70 fAutoScale = input; -
trunk/MagicSoft/Mars/mgui/MHexagon.cc
r849 r959 30 30 #include "MHexagon.h" 31 31 32 #include <iostream.h> 33 32 34 #include <TVirtualPad.h> // gPad 33 35 34 36 #include "MGeomPix.h" // GetX 35 37 36 ClassImp(MHexagon) 37 38 MHexagon::MHexagon() 39 { 40 // default constructor for MHexagon 41 38 ClassImp(MHexagon); 39 40 // ------------------------------------------------------------------------ 41 // 42 // default constructor for MHexagon 43 // 44 MHexagon::MHexagon() 45 { 46 } 47 48 // ------------------------------------------------------------------------ 49 // 50 // normal constructor for MHexagon 51 // 52 MHexagon::MHexagon(Float_t x, Float_t y, Float_t d) 53 : TAttFill(0, 1001), fX(x), fY(y), fD(d) 54 { 55 } 56 57 // ------------------------------------------------------------------------ 58 // 59 // normal constructor for MHexagon 60 // 61 MHexagon::MHexagon(MGeomPix &pix) 62 : TAttFill(0, 1001) 63 { 64 fX = pix.GetX(); 65 fY = pix.GetY(); 66 fD = pix.GetR(); 67 } 68 69 // ------------------------------------------------------------------------ 70 // 71 // copy constructor for MHexagon 72 // 73 MHexagon::MHexagon(const MHexagon &hexagon) 74 { 75 ((MHexagon&) hexagon).Copy(*this); 42 76 } 43 77 44 MHexagon::MHexagon(Float_t x, Float_t y, Float_t d ) 45 : TAttFill(0, 1001), fX(x), fY(y), fD(d) 46 { 47 // normal constructor for MHexagon 48 } 49 50 MHexagon::MHexagon(MGeomPix &pix) 51 : TAttFill(0, 1001) 52 { 53 // normal constructor for MHexagon 54 fX = pix.GetX(); 55 fY = pix.GetY(); 56 fD = pix.GetR(); 57 } 58 59 MHexagon::MHexagon( const MHexagon &hexagon) 60 { 61 // copy constructor for MHexagon 62 ((MHexagon&) hexagon).Copy(*this) ; 63 } 64 78 // ------------------------------------------------------------------------ 79 // 80 // default destructor for MHexagon 81 // 65 82 MHexagon::~MHexagon() 66 { 67 // default destructor for MHexagon 68 } 69 70 void MHexagon::Copy( TObject &obj ) 71 { 72 // copy this hexagon to hexagon 83 { 84 } 85 86 // ------------------------------------------------------------------------ 87 // 88 // copy this hexagon to hexagon 89 // 90 void MHexagon::Copy(TObject &obj) 91 { 73 92 MHexagon &hex = (MHexagon&) obj; 74 93 … … 77 96 TAttFill::Copy(hex); 78 97 79 hex.fX = fX ; 80 hex.fY = fY ; 81 hex.fD = fD ; 82 } 83 Int_t MHexagon::DistancetoPrimitive( Int_t px, Int_t py ) 84 { 85 // compute the distance of a point (px,py) to the Hexagon 86 // this functions needed for graphical primitives, that 87 // means without this function you are not able to interact 88 // with the graphical primitive with the mouse!!! 89 // 90 // All calcutations are running in pixel coordinates 91 92 // compute the distance of the Point to the center of the Hexagon 93 94 const Int_t pxhex = gPad->XtoAbsPixel( fX ) ; 95 const Int_t pyhex = gPad->YtoAbsPixel( fY ) ; 96 97 const Double_t DistPointHexagon = TMath::Sqrt( Double_t ((pxhex-px)*(pxhex-px) + (pyhex-py)*(pyhex-py))) ; 98 const Double_t cosa = TMath::Abs(px-pxhex) / DistPointHexagon ; 99 const Double_t sina = TMath::Abs(py-pyhex) / DistPointHexagon ; 100 101 // comput the distance to pixel border 102 103 const Double_t dx = fD * cosa / 2 ; 104 const Double_t dy = fD * sina / 2 ; 105 106 const Double_t xborder = fX + dx ; 107 const Double_t yborder = fY + dy ; 108 109 const Int_t pxborder = gPad->XtoAbsPixel( xborder ) ; 110 const Int_t pyborder = gPad->YtoAbsPixel( yborder ) ; 111 112 const Double_t DistBorderHexagon = TMath::Sqrt( Double_t ((pxborder-pxhex)*(pxborder-pxhex)+(pyborder-pyhex)*(pyborder-pyhex))) ; 113 114 115 // compute the distance from the border of Pixel 116 // here in the first implementation is just circle inside 117 118 return DistBorderHexagon < DistPointHexagon ? 999999 : 0; 119 } 120 121 void MHexagon::DrawHexagon( Float_t x, Float_t y, Float_t d ) 98 hex.fX = fX; 99 hex.fY = fY; 100 hex.fD = fD; 101 } 102 103 // ------------------------------------------------------------------------ 104 // 105 // compute the distance of a point (px,py) to the Hexagon 106 // this functions needed for graphical primitives, that 107 // means without this function you are not able to interact 108 // with the graphical primitive with the mouse!!! 109 // 110 // All calcutations are running in pixel coordinates 111 // 112 Int_t MHexagon::DistancetoPrimitive(Int_t px, Int_t py) 113 { 114 // 115 // compute the distance of the Point to the center of the Hexagon 116 // 117 const Int_t pxhex = gPad->XtoAbsPixel(fX); 118 const Int_t pyhex = gPad->YtoAbsPixel(fY); 119 120 const Double_t disthex = TMath::Sqrt((Double_t)((pxhex-px)*(pxhex-px) + (pyhex-py)*(pyhex-py))); 121 122 const Double_t cosa = TMath::Abs(px-pxhex) / disthex; 123 const Double_t sina = TMath::Abs(py-pyhex) / disthex; 124 125 // 126 // comput the distance to pixel border 127 // 128 const Double_t dx = fD * cosa / 2; 129 const Double_t dy = fD * sina / 2; 130 131 const Double_t xborder = fX + dx; 132 const Double_t yborder = fY + dy; 133 134 const Int_t pxborder = gPad->XtoAbsPixel(xborder); 135 const Int_t pyborder = gPad->YtoAbsPixel(yborder); 136 137 const Double_t distborder = TMath::Sqrt((Double_t)((pxborder-pxhex)*(pxborder-pxhex)+(pyborder-pyhex)*(pyborder-pyhex))); 138 139 // 140 // compute the distance from the border of Pixel 141 // here in the first implementation is just circle inside 142 // 143 return distborder < disthex ? 999999 : 0; 144 } 145 146 // ------------------------------------------------------------------------ 147 // 148 // Draw this ellipse with new coordinate 149 // 150 void MHexagon::DrawHexagon(Float_t x, Float_t y, Float_t d) 122 151 { 123 // Draw this ellipse with new coordinate 124 125 MHexagon *newhexagon = new MHexagon(x, y, d ) ; 126 TAttLine::Copy(*newhexagon) ; 127 TAttFill::Copy(*newhexagon) ; 128 129 newhexagon->SetBit (kCanDelete) ; 130 newhexagon->AppendPad() ; 131 } 132 133 void MHexagon::ExecuteEvent(Int_t event, Int_t px, Int_t py ) { 134 // This is the first test of implementing a clickable interface 135 // for one pixel 136 137 switch ( event ) { 138 139 case kButton1Down: 140 141 printf ("\n kButton1Down \n" ) ; 142 SetFillColor(2) ; 143 gPad->Modified() ; 144 break; 145 146 case kButton1Double: 147 SetFillColor(0) ; 148 gPad->Modified() ; 149 break; 150 // case kMouseEnter: 151 // printf ("\n Mouse inside object \n" ) ; 152 // break; 153 } 154 155 } 156 157 158 159 void MHexagon::ls( Option_t *) 160 { 161 // list this hexagon with its attributes 162 TROOT::IndentLevel() ; 163 printf ("%s: X= %f Y= %f R= %f \n", GetName(), fX, fY, fD ) ; 164 } 165 166 void MHexagon::Paint(Option_t * ) 167 { 168 // paint this hexagon with its attribute 169 170 PaintHexagon(fX, fY, fD ) ; 171 } 172 173 174 void MHexagon::PaintHexagon (Float_t inX, Float_t inY, Float_t inD ) 152 MHexagon *newhexagon = new MHexagon(x, y, d); 153 154 TAttLine::Copy(*newhexagon); 155 TAttFill::Copy(*newhexagon); 156 157 newhexagon->SetBit(kCanDelete); 158 newhexagon->AppendPad(); 159 } 160 161 // ------------------------------------------------------------------------ 162 // 163 // This is the first test of implementing a clickable interface 164 // for one pixel 165 // 166 void MHexagon::ExecuteEvent(Int_t event, Int_t px, Int_t py) 167 { 168 169 switch (event) 170 { 171 case kButton1Down: 172 cout << endl << "kButton1Down" << endl; 173 SetFillColor(2); 174 gPad->Modified(); 175 break; 176 177 case kButton1Double: 178 SetFillColor(0); 179 gPad->Modified(); 180 break; 181 // case kMouseEnter: 182 // printf ("\n Mouse inside object \n" ) ; 183 // break; 184 } 185 } 186 187 // ------------------------------------------------------------------------ 188 // 189 // list this hexagon with its attributes 190 // 191 void MHexagon::ls(Option_t *) 192 { 193 TROOT::IndentLevel(); 194 Print(); 195 } 196 197 // ------------------------------------------------------------------------ 198 // 199 // paint this hexagon with its attribute 200 // 201 void MHexagon::Paint(Option_t *) 202 { 203 PaintHexagon(fX, fY, fD); 204 } 205 206 // ------------------------------------------------------------------------ 207 // 208 // draw this hexagon with the coordinates 209 // 210 void MHexagon::PaintHexagon(Float_t inX, Float_t inY, Float_t inD) 175 211 { 176 // draw this hexagon with the coordinates 177 178 const Int_t np = 6 ; 179 180 const Float_t dx[np+1] = { .5 , 0. , -.5 , -.5 , 0. , .5 , .5 } ; 181 const Float_t dy[np+1] = { .2886, .5772, .2886, -.2886, -.5772, -.2886, .2886 } ; 182 183 static Float_t x[np+1], y[np+1] ; 184 185 TAttLine::Modify() ; // Change line attributes only if neccessary 186 TAttFill::Modify() ; // Change fill attributes only if neccessary 187 188 // calculate the positions of the pixel corners 189 190 for ( Int_t i=0; i<=np; i++ ) { 191 x[i] = inX + dx[i]* inD ; 192 y[i] = inY + dy[i]* inD ; 193 } 194 195 // paint the pixel (hopefully) 196 197 if ( GetFillColor() ) gPad->PaintFillArea(np, x, y) ; 198 if ( GetLineStyle() ) gPad->PaintPolyLine(np+1, x, y) ; 199 200 } 201 202 void MHexagon::Print( Option_t * ) 203 { 204 // print/dump this hexagon with its attributes 205 printf ("Ellipse: X= %f Y= %f R= %f ", fX, fY, fD ) ; 206 207 if ( GetLineColor() != 1 ) printf (" Color=%d", GetLineColor() ) ; 208 if ( GetLineStyle() != 1 ) printf (" Color=%d", GetLineStyle() ) ; 209 if ( GetLineWidth() != 1 ) printf (" Color=%d", GetLineWidth() ) ; 210 211 if ( GetFillColor() != 0 ) printf (" FillColor=%d", GetFillColor() ) ; 212 213 printf ("\n") ; 214 } 215 216 217 218 219 220 212 213 const Int_t np = 6; 214 215 const Float_t dx[np+1] = { .5 , 0. , -.5 , -.5 , 0. , .5 , .5 }; 216 const Float_t dy[np+1] = { .2886, .5772, .2886, -.2886, -.5772, -.2886, .2886 }; 217 218 static Float_t x[np+1], y[np+1]; 219 220 TAttLine::Modify(); // Change line attributes only if neccessary 221 TAttFill::Modify(); // Change fill attributes only if neccessary 222 223 // calculate the positions of the pixel corners 224 225 for (Int_t i=0; i<=np; i++) 226 { 227 x[i] = inX + dx[i]* inD; 228 y[i] = inY + dy[i]* inD; 229 } 230 231 // paint the pixel (hopefully) 232 233 if (GetFillColor()) 234 gPad->PaintFillArea(np, x, y); 235 236 if (GetLineStyle()) 237 gPad->PaintPolyLine(np+1, x, y); 238 239 } 240 241 // ------------------------------------------------------------------------ 242 // 243 // print/dump this hexagon with its attributes 244 // 245 void MHexagon::Print(Option_t *) 246 { 247 cout << GetName() << ": X=" << fX << " Y=" << fY << "R=" << fD << endl; 248 249 cout << " Color=" << GetLineColor() << endl; 250 cout << " Style=" << GetLineStyle() << endl; 251 cout << " Width=" << GetLineWidth() << endl; 252 cout << " FillColor=" << GetFillColor() << endl; 253 }
Note:
See TracChangeset
for help on using the changeset viewer.