29 TGraphNode::TGraphNode(): TNamed(), TAttText()
41 TGraphNode::TGraphNode(
const char *name,
const char *title)
42 :TNamed(name,title), TAttText()
54 TGraphNode::~TGraphNode()
61 void TGraphNode::CreateGVNode(GVizAgraph_t *gv)
65 fGVNode = (GVizAgnode_t*)agnode((Agraph_t*)gv, (
char *)GetName(), 1);
67 fGVNode = (GVizAgnode_t*)agnode((Agraph_t*)gv, (
char *)GetName());
70 Error(
"CreateGVNode",
"Invalid graphviz graph");
77 Int_t TGraphNode::DistancetoPrimitive(Int_t px, Int_t py)
82 TEllipse ellipse(fX, fY, fW, fH, 0., 360., 0.);
83 ellipse.SetFillColor(1);
84 dist = ellipse.DistancetoPrimitive(px, py);
92 void TGraphNode::ExecuteEvent(Int_t event, Int_t px, Int_t py)
94 TEllipse ellipse(fX, fY, fW, fH, 0., 360., 0.);
95 ellipse.ExecuteEvent(event,px, py);
106 void TGraphNode::Layout()
109 fX = ND_coord((Agnode_t*)fGVNode).x;
110 fY = ND_coord((Agnode_t*)fGVNode).y;
113 fX = ND_coord_i((Agnode_t*)fGVNode).x;
114 fY = ND_coord_i((Agnode_t*)fGVNode).y;
116 fW = ND_width((Agnode_t*)fGVNode)*36;
117 fH = ND_height((Agnode_t*)fGVNode)*36;
123 void TGraphNode::Paint(Option_t *)
127 text.SetTextAlign(22);
131 ellipse.SetFillStyle(GetFillStyle());
132 ellipse.SetFillColor(GetFillColor());
133 ellipse.SetLineColor(GetLineColor());
134 ellipse.SetLineStyle(GetLineStyle());
135 ellipse.SetLineWidth(GetLineWidth());
136 ellipse.PaintEllipse(fX, fY, fW, fH, 0., 360., 0.,
"");
139 text.SetTextColor(GetTextColor());
140 text.SetTextFont(GetTextFont());
141 text.PaintLatex(fX, fY, 0., GetTextSize(), (
char*)GetTitle());
147 void TGraphNode::SavePrimitive(std::ostream &, Option_t *)
155 void TGraphNode::SaveAttributes(std::ostream &out)
157 SaveFillAttributes(out,GetName(),0,1001);
158 SaveLineAttributes(out,GetName(),1,1,1);
159 SaveTextAttributes(out,GetName(),0,0,0,0,0);
164 void TGraphNode::Streamer(TBuffer &)