public void RecalculateDashes() { var rules = MarkupLineRawRule.GetRules(RawRules); var dashes = new List <MarkupStyleDash>(); foreach (var rule in rules) { var trajectoryPart = Trajectory.Cut(rule.Start, rule.End); var ruleDashes = rule.LineStyle.Calculate(trajectoryPart).ToArray(); dashes.AddRange(ruleDashes); } Dashes = dashes.ToArray(); }
public float Distance(float from = 0f, float to = 1f) => Trajectory.Cut(from, to).Length();
public ITrajectory Cut(float t0, float t1) => new BezierTrajectory(Trajectory.Cut(t0, t1));
public float Travel(float start, float distance) => start + Trajectory.Cut(start, 1f).Travel(distance) * (1f - start);