public void AppendLineSegment(Point p) { PathFigureEditor pathFigureEditor = this.CreatePathFigureEditor(this.path.Figures.Count - 1); if (!PathFigureUtilities.IsOpen(pathFigureEditor.PathFigure)) { throw new InvalidOperationException(ExceptionStringTable.LastFigureMustBeOpenToAppendALineSegment); } pathFigureEditor.LineTo(p); }
public void AppendQuadraticBezier(Point q, Point r, int figureIndex) { PathFigureEditor pathFigureEditor = this.CreatePathFigureEditor(figureIndex); if (!PathFigureUtilities.IsOpen(pathFigureEditor.PathFigure)) { throw new InvalidOperationException(ExceptionStringTable.LastFigureMustBeOpenToAppendAQuadraticCurve); } pathFigureEditor.QuadraticCurveTo(q, r); }
public void CloseFigureWithCubicBezier(Point q, Point r, int figureIndex) { PathFigureEditor pathFigureEditor = this.CreatePathFigureEditor(figureIndex); if (!PathFigureUtilities.IsOpen(pathFigureEditor.PathFigure)) { throw new InvalidOperationException(ExceptionStringTable.FigureMustBeOpenToAppendACubicCurve); } pathFigureEditor.CubicCurveToAndCloseFigure(q, r); }
public void CloseFigureWithLineSegment(int figureIndex) { PathFigureEditor pathFigureEditor = this.CreatePathFigureEditor(figureIndex); if (!PathFigureUtilities.IsOpen(pathFigureEditor.PathFigure)) { throw new InvalidOperationException(ExceptionStringTable.FigureMustBeOpenToAppendALineSegment); } pathFigureEditor.CloseWithLineSegment(); }
public bool IsFigureOpen(int figureIndex) { return(PathFigureUtilities.IsOpen(this.path.Figures[figureIndex])); }