internal void Draw(Graphic g) { int fh = 30; int space = node.GetSpace(); // TODO:unfinished if (space >= fh) { active = true; HTCoordS zs = node.GetScreenCoordinates(); String name = node.GetName(); Color color = node.GetColor(); height = fh + 2 * node.GetSize(); width = space + 10 + 2 * node.GetSize(); x = zs.X - (width / 2) - node.GetSize(); y = zs.Y - (fh / 2) - node.GetSize(); g.DrawDot(zs.X, zs.Y, 3, color); g.DrawLabel(x, y, width, height, name, color); } else { active = false; } }
internal virtual void DrawNodes(Graphic g) { if (fastMode == false) { label.Draw(g); } }
internal void Draw(Graphic g, Color color) { g.SetColor(color); switch (type) { case LINE: g.DrawLine(a.X, a.Y, b.X, b.Y); break; case ARC: g.DrawCurve(a.X, a.Y, c.X, c.Y, b.X, b.Y); break; default: break; } }
public MainPage() { InitializeComponent(); XDocument xdoc = XDocument.Load("resources/result.xml"); root = new HTXMLNode(xdoc.Element("xbrldata")); hypertree = new HyperTree(root); //TODO:是否使用静态方法? Graphic graphic = new Graphic(); //graphic.Canvas = this.LayoutRoot; SilverlightHTView view = hypertree.GetSLView(); graphic.Canvas = view.LayoutRoot; view.graphic = graphic; view.Repaint(); this.Width = 500; this.Height = 500; this.LayoutRoot.Children.Add(view); }
internal virtual void DrawBranches(Graphic g) { }
internal override void DrawBranches(Graphic g) { HTDrawNode child = null; for (IEnumerator i = Children(); i.MoveNext(); ) { child = (HTDrawNode)i.Current; HTGeodesic geod = (HTGeodesic)geodesics[child]; if (geod != null) { geod.Draw(g, child.GetBranchColor()); } child.DrawBranches(g); } }
internal override void DrawNodes(Graphic g) { if (fastMode == false) { base.DrawNodes(g); HTDrawNode child = null; for (IEnumerator i = Children(); i.MoveNext(); ) { child = (HTDrawNode)i.Current; child.DrawNodes(g); } } }
public void PaintComponent(Graphic g) { draw.RefreshScreenCoordinates(); draw.DrawBranches(g); draw.DrawNodes(g); }
internal void DrawNodes(Graphic g) { drawRoot.DrawNodes(g); }
internal void DrawBranches(Graphic g) { drawRoot.DrawBranches(g); }