Esempio n. 1
0
        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();
        }
Esempio n. 2
0
 public float Distance(float from = 0f, float to = 1f) => Trajectory.Cut(from, to).Length();
Esempio n. 3
0
 public ITrajectory Cut(float t0, float t1) => new BezierTrajectory(Trajectory.Cut(t0, t1));
Esempio n. 4
0
 public float Travel(float start, float distance) => start + Trajectory.Cut(start, 1f).Travel(distance) * (1f - start);