public void ComputePath()
        {
            var path = CreatePath(pathGeometry);

            if (path != null)
            {
                ClearPath();

                pathGeometry = path;
            }
        }
Beispiel #2
0
        protected override IPathPart CreatePath(IPathPart current)
        {
            var parentNode = Parent?.Node;

            if (parentNode == null)
            {
                return(null);
            }

            if (current == null || (current is FilledPath && !(parentNode is RootNode)) || (current is LinePath && parentNode is RootNode))
            {
                if (Parent.Node is RootNode)
                {
                    return(new FilledPath(Colors.Black));
                }

                return(new LinePath(Colors.Black));
            }

            return(null);
        }
 protected abstract IPathPart CreatePath(IPathPart current);
 private void ClearPath()
 {
     pathGeometry?.ClearResources();
     pathGeometry = null;
 }