Exemplo n.º 1
0
        public static void AddPathFigure(
            this D2D.GeometrySink sink, Jupiter.Media.PathFigure pathFigure)
        {
            sink.BeginFigure(
                pathFigure.StartPoint.ToSharpDX(),
                pathFigure.IsFilled ? D2D.FigureBegin.Filled : D2D.FigureBegin.Hollow);

            foreach (var segment in pathFigure.Segments)
            {
                sink.AddPathFigureSegment(segment);
            }

            sink.EndFigure(pathFigure.IsClosed ? D2D.FigureEnd.Closed : D2D.FigureEnd.Open);
        }