- Timestamp:
- 07/23/02 11:16:13 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/AnalysisLinkDef.h
r1409 r1426 22 22 23 23 #pragma link C++ class MHadroness+; 24 #pragma link C++ class MHadronessRuleCalc+;25 24 26 25 #pragma link C++ class MCompProbCalc+; -
trunk/MagicSoft/Mars/mgui/MCamDisplay.cc
r1423 r1426 126 126 // delete fGeomCam; 127 127 128 // if (fIsAllocated) 129 // delete fDrawingPad; 128 if (fDrawingPad->GetListOfPrimitives()->FindObject(this)==this && 129 fIsAllocated) 130 { 131 fDrawingPad->RecursiveRemove(this); 132 delete fDrawingPad; 133 } 130 134 } 131 135 -
trunk/MagicSoft/Mars/mgui/MCamDisplay.h
r1406 r1426 57 57 ~MCamDisplay(); 58 58 59 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);60 //virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);61 62 59 void SetAutoScale(Bool_t input=kTRUE) { fAutoScale = input; } 63 60 void DrawPhotNum(const MCerPhotEvt *event); … … 65 62 void DrawPixelNumbers(); 66 63 67 virtual void Reset(); 68 virtual void Draw(Option_t *option=""); 69 virtual void SavePrimitive(ofstream &out, Option_t *); 64 virtual void Reset(); 65 virtual void Draw(Option_t *option=""); 66 virtual void SavePrimitive(ofstream &out, Option_t *); 67 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); 68 //virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); 70 69 71 70 void SetPalette(Int_t ncolors, Int_t *colors); -
trunk/MagicSoft/Mars/mgui/MHexagon.cc
r1405 r1426 121 121 const Int_t pyhex = gPad->YtoAbsPixel(fY); 122 122 123 const Double_t disthex = TMath::Sqrt((Double_t)((pxhex-px)*(pxhex-px) + (pyhex-py)*(pyhex-py))); 123 const Double_t x = TMath::Abs(px-pxhex); 124 const Double_t y = TMath::Abs(py-pyhex); 125 126 const Double_t disthex = TMath::Sqrt(x*x + y*y); 124 127 125 128 if (disthex==0) 126 129 return 0; 127 130 128 const Double_t cosa = TMath::Abs(px-pxhex)/ disthex;129 const Double_t sina = TMath::Abs(py-pyhex)/ disthex;130 131 // 132 // comput the distance to pixel border131 const Double_t cosa = x / disthex; 132 const Double_t sina = y / disthex; 133 134 // 135 // comput the distance of hexagon center to pixel border 133 136 // 134 137 const Double_t dx = fD * cosa / 2; 135 138 const Double_t dy = fD * sina / 2; 136 139 137 const Double_t xborder = fX + dx;138 const Double_t yborder = fY + dy;139 140 const Int_t pxborder = gPad->XtoAbsPixel(xborder);141 const Int_t pyborder = gPad->YtoAbsPixel(yborder);142 143 const Double_t distborder = TMath::Sqrt( (Double_t)((pxborder-pxhex)*(pxborder-pxhex)+(pyborder-pyhex)*(pyborder-pyhex)));140 const Int_t pxborder = gPad->XtoAbsPixel(fX + dx); 141 const Int_t pyborder = gPad->YtoAbsPixel(fY + dy); 142 143 const Double_t bx = pxhex-pxborder; 144 const Double_t by = pyhex-pyborder; 145 146 const Double_t distborder = TMath::Sqrt(bx*bx + by*by); 144 147 145 148 // … … 147 150 // here in the first implementation is just circle inside 148 151 // 149 return distborder < disthex ? 999999: 0;152 return distborder < disthex ? (int)(disthex-distborder+1) : 0; 150 153 } 151 154 -
trunk/MagicSoft/Mars/mgui/MineSweeper.cc
r1423 r1426 206 206 delete fDone; 207 207 208 // if (fIsAllocated) 209 // delete fDrawingPad; 208 if (fDrawingPad->GetListOfPrimitives()->FindObject(this)==this) 209 { 210 fDrawingPad->RecursiveRemove(this); 211 delete fDrawingPad; 212 } 210 213 } 211 214
Note:
See TracChangeset
for help on using the changeset viewer.