public void AddPathReverse(GraphicsPath path) { for (int i = path.PathActions.Count - 1; i > 0; i--) { PathActions.Add(path.PathActions[i]); } }
public void AddPath(GraphicsPath path) { foreach (var action in path.PathActions) { PathActions.Add(action); } }
public void Close() { if (PathActions.Count == 0) { return; } PathActions.Add(new PathAction(GetPathStart().PathPoint, VerbType.Close)); }
public void LineTo(Point point) { if (PathActions.Count == 0) { MoveTo(point); return; } PathActions.Add(new PathAction(point, VerbType.Line)); }
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)); }
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); } }
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); } }
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); } }
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); } }
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)); }