Esempio n. 1
0
 protected internal override ExcelDxfBorderBase Clone()
 {
     return(new ExcelDxfBorderBase(_styles)
     {
         Bottom = Bottom.Clone(), Top = Top.Clone(), Left = Left.Clone(), Right = Right.Clone()
     });
 }
Esempio n. 2
0
 /// <summary>
 /// Deep clone, to avoid mess up the original data during offsetting the boundary.
 /// </summary>
 /// <returns>Cloned object</returns>
 public Trapezoid Clone()
 {
     return(new Trapezoid(
                Top.Clone() as Line,
                Vertical.Clone() as Line,
                Bottom.Clone() as Line,
                Slanted.Clone() as Line));
 }
Esempio n. 3
0
 public object Clone()
 {
     return(new CSSPadding
     {
         Left = Left.Clone() as CSSNumber,
         Right = Right.Clone() as CSSNumber,
         Top = Top.Clone() as CSSNumber,
         Bottom = Bottom.Clone() as CSSNumber
     });
 }
Esempio n. 4
0
        public object Clone()
        {
            return(new CSSBorder
            {
                Left = Left.Clone() as CSSNumber,
                Right = Right.Clone() as CSSNumber,
                Top = Top.Clone() as CSSNumber,
                Bottom = Bottom.Clone() as CSSNumber,

                Type = Type,
                Radius = Radius.Clone() as CSSNumber,
                Color = Color.Clone() as CSSColor
            });
        }
Esempio n. 5
0
        public Step CloneStep()
        {
            var clonedStep = (Step)Activator.CreateInstance(GetType());

            //foreach (Symbol.Symbol symbol in Top)
            //{
            //    clonedStep.Top = symbol.Clone();
            //}

            clonedStep.Top   = Top.Clone();
            clonedStep.Title = this.Title;

            return(clonedStep);
        }
Esempio n. 6
0
        /// <summary>
        /// Draw the trapezoid wire-frame with Revit Model curves.
        /// It's for debug use, to help developer see the exact location.
        /// </summary>
        /// <param name="revitDoc">Revit DB Document</param>
        public void Draw(Document revitDoc)
        {
            XYZ topDir      = (Top.GetEndPoint(1) - Top.GetEndPoint(0)).Normalize();
            XYZ verticalDir = (Vertical.GetEndPoint(0) - Vertical.GetEndPoint(1)).Normalize();
            XYZ normal      = topDir.CrossProduct(verticalDir);

            SketchPlane sketchplane = SketchPlane.Create(revitDoc, new Plane(normal, Vertical.GetEndPoint(0)));

            CurveArray curves = new CurveArray();

            curves.Append(Top.Clone());
            curves.Append(Vertical.Clone());
            curves.Append(Bottom.Clone());
            curves.Append(Slanted.Clone());
            revitDoc.Create.NewModelCurveArray(curves, sketchplane);
        }