private void CopyChildren(IPanelElement fromPanel,
                           IPanelElement toPanel)
 {
     foreach (var copyMe in fromPanel.Children.GetAllChildren())
     {
         var iAmCopy = InstantiateCopyBase(copyMe);
         toPanel.AddChild(iAmCopy);
     }
 }
Exemple #2
0
        private static Matrix3D GetTransformation(this IPanelElement panel)
        {
            var matrix = Matrix3D.Identity;

            if (panel is IMovablePanel mp)
            {
                var m = Matrix3D.Identity;

                m.OffsetX = mp.OffsetX;
                matrix.Append(m);
            }

            var mc = Matrix3D.Identity;

            mc.OffsetX = panel.CenterX;
            mc.OffsetY = panel.CenterY;
            mc.OffsetZ = panel.CenterZ;

            matrix.Append(mc);

            return(matrix);
        }
Exemple #3
0
 public IToolToPanelTransformer GetTransformer(IPanelElement panel, IEnumerable <IToolElement> tools) => new ToolToPanelTransformer(panel, tools);
Exemple #4
0
 public ToolToPanelTransformer(IPanelElement panel, IEnumerable <IToolElement> tools)
 {
     _panel = panel;
     _tools = tools;
 }