Пример #1
0
 public void AddPathReverse(GraphicsPath path)
 {
     for (int i = path.PathActions.Count - 1; i > 0; i--)
     {
         PathActions.Add(path.PathActions[i]);
     }
 }
Пример #2
0
 public void AddPath(GraphicsPath path)
 {
     foreach (var action in path.PathActions)
     {
         PathActions.Add(action);
     }
 }
Пример #3
0
        public void Close()
        {
            if (PathActions.Count == 0)
            {
                return;
            }

            PathActions.Add(new PathAction(GetPathStart().PathPoint, VerbType.Close));
        }
Пример #4
0
        public void LineTo(Point point)
        {
            if (PathActions.Count == 0)
            {
                MoveTo(point);
                return;
            }

            PathActions.Add(new PathAction(point, VerbType.Line));
        }
Пример #5
0
        public void LineTo(int x, int y)
        {
            if (PathActions.Count == 0)
            {
                MoveTo(x, y);
                return;
            }

            PathActions.Add(new PathAction(new Point(x, y), VerbType.Line));
        }
Пример #6
0
        public void RelativeLineTo(Point point)
        {
            int count = PathActions.Count;

            if (count > 0)
            {
                PathActions.Add(new PathAction(point + ((PathAction)PathActions[count - 1]).PathPoint, VerbType.Line));
            }
            else
            {
                LineTo(point);
            }
        }
Пример #7
0
        public void RelativeLineTo(int x, int y)
        {
            int count = PathActions.Count;

            if (count > 0)
            {
                PathActions.Add(new PathAction(new Point(x, y) + ((PathAction)PathActions[count - 1]).PathPoint, VerbType.Line));
            }
            else
            {
                LineTo(x, y);
            }
        }
Пример #8
0
        public void RelativeMoveTo(Point point)
        {
            int count = PathActions.Count;

            if (count > 0)
            {
                PathActions.Add(new PathAction(point + PathActions[count - 1].PathPoint, VerbType.Move));
            }
            else
            {
                MoveTo(point);
            }
        }
Пример #9
0
        public void RelativeMoveTo(int x, int y)
        {
            int count = PathActions.Count;

            if (count > 0)
            {
                PathActions.Add(new PathAction(new Point(x, y) + PathActions[count - 1].PathPoint, VerbType.Move));
            }
            else
            {
                MoveTo(x, y);
            }
        }
Пример #10
0
        public void MoveTo(Point point)
        {
            if (PathActions.Count > 0)
            {
                var last = GetLastAction();

                if (last.Verb == VerbType.Move)
                {
                    last.PathPoint = point;
                    return;
                }
            }

            PathActions.Add(new PathAction(point, VerbType.Move));
        }