File indexing completed on 2024-04-06 12:11:37
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include "TBox.h"
0015 #include "TEllipse.h"
0016 #include "TEveViewer.h"
0017
0018
0019 #include "Fireworks/Core/interface/FWDetailViewBase.h"
0020 #include "Fireworks/Core/interface/FWModelId.h"
0021 #include "Fireworks/Core/interface/FWEventItem.h"
0022
0023 FWDetailViewBase::FWDetailViewBase(const std::type_info &iInfo) : m_item(nullptr), m_helper(iInfo) {}
0024
0025 FWDetailViewBase::~FWDetailViewBase() {}
0026
0027 void FWDetailViewBase::build(const FWModelId &iID) {
0028 m_helper.itemChanged(iID.item());
0029 build(iID, m_helper.offsetObject(iID.item()->modelData(iID.index())));
0030 }
0031
0032 const fireworks::Context &FWDetailViewBase::context() const { return m_item->context(); }
0033
0034
0035
0036 void FWDetailViewBase::drawCanvasDot(Float_t x, Float_t y, Float_t r, Color_t fillColor) {
0037
0038
0039 Float_t ratio = 0.5;
0040
0041 TEllipse *b2 = new TEllipse(x, y, r, r * ratio);
0042 b2->SetFillStyle(1001);
0043 b2->SetFillColor(fillColor);
0044 b2->Draw();
0045
0046
0047 TEllipse *b1 = new TEllipse(x, y, r, r * ratio);
0048 b1->SetFillStyle(0);
0049 b1->SetLineWidth(2);
0050 b1->Draw();
0051 }
0052
0053 void FWDetailViewBase::drawCanvasBox(Double_t *pos, Color_t fillCol, Int_t fillType, bool bg) {
0054
0055
0056
0057 if (bg) {
0058 TBox *b1 = new TBox(pos[0], pos[1], pos[2], pos[3]);
0059 b1->SetFillColor(fillCol);
0060 b1->Draw();
0061 }
0062
0063
0064 TBox *b2 = new TBox(pos[0], pos[1], pos[2], pos[3]);
0065 b2->SetFillStyle(fillType);
0066 b2->SetFillColor(kBlack);
0067 b2->Draw();
0068
0069
0070 TBox *b3 = new TBox(pos[0], pos[1], pos[2], pos[3]);
0071 b3->SetFillStyle(0);
0072 b3->SetLineWidth(2);
0073 b3->Draw();
0074 }