Esempio n. 1
0
        private hEllipse AddEllipse(wEllipse InputCurve)
        {
            hEllipse crv = new hEllipse(InputCurve);

            crv.BuildSVGCurve();
            return(crv);
        }
Esempio n. 2
0
 public hEllipse(wEllipse WindGeometry)
 {
     CenterX = WindGeometry.Center.X;
     CenterY = WindGeometry.Center.Y;
     RadiusX = WindGeometry.RadiusX;
     RadiusY = WindGeometry.RadiusY;
     Angle   = WindGeometry.Rotation;
 }
Esempio n. 3
0
        public void AddShape()
        {
            hShape shape = new hShape("p" + Index);
            hPath  path  = new hPath();

            GroupCheck(Shapes);

            switch (Shapes.Type)
            {
            case "Arc":
                AddArc((wArc)Shapes.Shapes[0].Curve);
                break;

            case "Circle":
                shape.SetShape(AddCircle((wCircle)Shapes.Shapes[0].Curve));
                break;

            case "Ellipse":
                wEllipse tempEllipse = (wEllipse)Shapes.Shapes[0].Curve;
                shape.SetShape(AddEllipse(tempEllipse));
                shape.AddAttribute(new hTransform(new hRotate(tempEllipse.Center, tempEllipse.Rotation).Transformation).Transformation);
                break;

            case "Line":
                shape.SetShape(AddLine((wLine)Shapes.Shapes[0].Curve));
                break;

            case "Polyline":
                shape.SetShape(AddPolyline((wPolyline)Shapes.Shapes[0].Curve));
                break;

            case "BezierSpline":
                shape.SetShape(AddSpline((wBezierSpline)Shapes.Shapes[0].Curve));
                break;

            default:
                break;
            }

            shape = SetGraphics(shape, Shapes.Graphics);

            if (Shapes.Effects.HasEffect)
            {
                hFilter filter = SetEffects(Shapes.Effects, Index);
                PathSet[Shapes.Group].Append(filter.Value);
                shape.AddAttribute(filter.ApplyFilter());
            }

            path = new hPath(shape);

            PathSet[Shapes.Group].Append(path.svgPath);
        }
Esempio n. 4
0
        public Path WpfEllipse(wCurve Shp, wGraphic Graphics, wEffects ShapeEffects)
        {
            Path            X = new Path();
            wEllipse        C = (wEllipse)Shp;
            EllipseGeometry E = new EllipseGeometry();

            E.Center  = new System.Windows.Point((C.Center.X) * Scale, (C.Center.Y) * Scale);
            E.RadiusX = C.RadiusX * Scale;
            E.RadiusY = C.RadiusY * Scale;

            E.Transform = new RotateTransform(C.Rotation, E.Center.X, E.Center.Y);

            X.Data            = E;
            X.RenderTransform = Xform;

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

            group.Shapes.Add(new wShape(E, Graphics));
            return(X);
        }