Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        public void CloseFigureWithLineSegment(int figureIndex)
        {
            PathFigureEditor pathFigureEditor = this.CreatePathFigureEditor(figureIndex);

            if (!PathFigureUtilities.IsOpen(pathFigureEditor.PathFigure))
            {
                throw new InvalidOperationException(ExceptionStringTable.FigureMustBeOpenToAppendALineSegment);
            }
            pathFigureEditor.CloseWithLineSegment();
        }
Ejemplo n.º 5
0
 public bool IsFigureOpen(int figureIndex)
 {
     return(PathFigureUtilities.IsOpen(this.path.Figures[figureIndex]));
 }