Exemplo n.º 1
0
        public void SetContents(List <IContent> contentsBefore, List <IContent> contentsAfter)
        {
            TrimPathContent trimPathContentBefore = null;

            for (var i = contentsBefore.Count - 1; i >= 0; i--)
            {
                var content = contentsBefore[i];
                if (content is TrimPathContent trimPathContent && trimPathContent.Type == ShapeTrimPath.Type.Individually)
                {
                    trimPathContentBefore = trimPathContent;
                }
            }
            if (trimPathContentBefore != null)
            {
                trimPathContentBefore.ValueChanged += OnValueChanged;
            }

            PathGroup currentPathGroup = null;

            for (var i = contentsAfter.Count - 1; i >= 0; i--)
            {
                var content = contentsAfter[i];
                if (content is TrimPathContent trimPathContent && trimPathContent.Type == ShapeTrimPath.Type.Individually)
                {
                    if (currentPathGroup != null)
                    {
                        _pathGroups.Add(currentPathGroup);
                    }
                    currentPathGroup              = new PathGroup(trimPathContent);
                    trimPathContent.ValueChanged += OnValueChanged;
                }
Exemplo n.º 2
0
 public void SetContents(List <IContent> contentsBefore, List <IContent> contentsAfter)
 {
     for (var i = 0; i < contentsBefore.Count; i++)
     {
         if (contentsBefore[i] is TrimPathContent trimPathContent && trimPathContent.Type == ShapeTrimPath.Type.Simultaneously)
         {
             _trimPath = trimPathContent;
             _trimPath.ValueChanged += OnValueChanged;
         }
     }
 }
Exemplo n.º 3
0
 public void SetContents(List <IContent> contentsBefore, List <IContent> contentsAfter)
 {
     for (var i = 0; i < contentsBefore.Count; i++)
     {
         if (contentsBefore[i] is TrimPathContent trimPathContent && trimPathContent.Type == ShapeTrimPath.Type.Simultaneously)
         {
             // Trim path individually will be handled by the stroke where paths are combined.
             _trimPath = trimPathContent;
             _trimPath.ValueChanged += OnValueChanged;
         }
     }
 }