Example #1
0
 public static ShapesBase.BaseRectangle RectangleToBase(Rectangle rectangle)
 {
     ShapesBase.BaseRectangle baseRectangle = new ShapesBase.BaseRectangle();
     baseRectangle.Height          = rectangle.Height;
     baseRectangle.Stroke          = rectangle.Stroke;
     baseRectangle.StrokeDashArray = rectangle.StrokeDashArray;
     baseRectangle.StrokeDashCap   = rectangle.StrokeDashCap;
     baseRectangle.StrokeThickness = rectangle.StrokeThickness;
     baseRectangle.Thickness       = rectangle.Margin;
     baseRectangle.Width           = rectangle.Width;
     return(baseRectangle);
 }
Example #2
0
        public static Rectangle BaseToRectangle(ShapesBase.BaseRectangle baseRectangle)
        {
            Rectangle rectangle = new Rectangle();

            rectangle.Height          = baseRectangle.Height;
            rectangle.Stroke          = baseRectangle.Stroke;
            rectangle.StrokeDashArray = baseRectangle.StrokeDashArray;
            rectangle.StrokeDashCap   = baseRectangle.StrokeDashCap;
            rectangle.StrokeThickness = baseRectangle.StrokeThickness;
            rectangle.Margin          = baseRectangle.Thickness;
            rectangle.Width           = baseRectangle.Width;
            return(rectangle);
        }