Exemplo n.º 1
0
        public void CompoundCurve()
        {
            hCompoundCurve crv   = new hCompoundCurve();
            hShape         shape = new hShape("p" + Index);
            hPath          path  = new hPath();

            GroupCheck(Shapes);

            foreach (wShape Shape in Shapes.Shapes)
            {
                hCubicBezierSpline spline = AddSpline((wBezierSpline)Shape.Curve);

                crv.AddCurve(spline);
            }

            shape.SetShape(crv);

            shape.AddAttribute(new hBoolean(hBoolean.FillRule.evenodd).Value);

            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);
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
        private hFilter SetEffects(wEffects Effects, int Index)
        {
            string InID  = "SourceGraphic";
            string OutID = "Result";

            hFilter Filter = new hFilter(Index.ToString());

            if (Effects.Blur.Active)
            {
                Filter.AddEffect(new hBlur(Effects.Blur, InID, OutID).Value);
                InID  = OutID;
                OutID = "ResultBlur";
            }

            if (Effects.DropShadow.Active)
            {
                Filter.AddEffect(new hDropShadow(Effects.DropShadow, InID, OutID).Value);
                InID  = OutID;
                OutID = "ResultShadow";
            }

            Filter.Build();
            return(Filter);
        }
Exemplo n.º 4
0
 public int Delete <T>(hTable <T> table, hFilter <T> row)
 {
     throw new NotImplementedException();
 }