internal static void SetPreviusPoint(List <SvgPathItem> path, int index, Vector2 p1) { SvgPathItem pre = null; Vector2? pm = null; index--; if (index < 0) { index = path.Count - 1; } pre = path[index]; if (pre.IsM()) { pm = pre.GetPoint(); pre.SetPoint(p1); } if (pre.IsZ()) { index--; pre = path[index]; } if (pm == null) { pre.SetPoint(p1); } else { var p = pre.GetPoint(); if (p == pm) { pre.SetPoint(p1); } } }
internal void RulerShow(Vector2 startPoint, Vector2 endPoint) { if (!RulerEnabled) { List <SvgPathItem> path = new List <SvgPathItem>(); SvgPathItem p1 = new SvgPathItem('M', null); p1.SetPoint(startPoint); SvgPathItem p2 = new SvgPathItem('L', p1); p2.SetPoint(endPoint); p1.Next = p2; path.Add(p1); path.Add(p2); Paths.Add(path); } RulerEnabled = true; RulerVisible = true; }