Exemple #1
0
        public Path WpfArc(wCurve Shp, wGraphic Graphics, wEffects ShapeEffects)
        {
            wArc       C = (wArc)Shp;
            ArcSegment S = new ArcSegment();

            S.Point = new System.Windows.Point(C.EndPoint.X * Scale, C.EndPoint.Y * Scale);
            S.Size  = new System.Windows.Size(C.Radius * Scale, C.Radius * Scale);

            if (C.Clockwise)
            {
                S.SweepDirection = SweepDirection.Clockwise;
            }
            else
            {
                S.SweepDirection = SweepDirection.Counterclockwise;
            }

            Path                  X  = new Path();
            PathFigure            Pf = new PathFigure();
            PathGeometry          G  = new PathGeometry();
            PathFigureCollection  Fc = new PathFigureCollection();
            PathSegmentCollection Sc = new PathSegmentCollection();

            Pf.StartPoint = new System.Windows.Point(C.StartPoint.X * Scale, C.StartPoint.Y * Scale);

            Sc.Add(S);
            Pf.Segments = Sc;
            Fc.Add(Pf);
            G.Figures = Fc;
            X.Data    = G;

            X.RenderTransform = Xform;

            X = SetPathFill(X, Graphics);
            X = SetPathStroke(X, Graphics);
            X = SetPathEffects(X, ShapeEffects);


            group.Shapes.Add(new wShape(G, Graphics));
            return(X);
        }
Exemple #2
0
 private void AddArc(wArc InputCurve)
 {
 }