Browse Source

Object graph - Arrow tip ends at node edge.

pull/15/head
mkonicek 15 years ago
parent
commit
dfad14e6ec
  1. 4
      src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Drawing/GraphDrawer.cs

4
src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Drawing/GraphDrawer.cs

@ -245,13 +245,13 @@ namespace Debugger.AddIn.Visualizers.Graph @@ -245,13 +245,13 @@ namespace Debugger.AddIn.Visualizers.Graph
Vector tangent = splineEndPoint - splineEndHandlePoint;
tangent.Normalize();
tangent = tangent * 20;
Point basePoint = splineEndPoint - 0.2 * tangent;
Point basePoint = splineEndPoint - 0.4 * tangent;
PathFigure arrowFigure = new PathFigure();
arrowFigure.IsClosed = true;
arrowFigure.IsFilled = true;
arrowFigure.StartPoint = basePoint + tangent * 0.4; // arrow tip
arrowFigure.StartPoint = splineEndPoint; // arrow tip
Vector tangent2 = rotate90(tangent);
arrowFigure.Segments.Add(new LineSegment(basePoint + tangent2 * 0.15, true));
arrowFigure.Segments.Add(new LineSegment(basePoint - tangent2 * 0.15, true));

Loading…
Cancel
Save