public override void UpdatePath(IPath path, PathOrientation pathOrientation, DimensionScale scale)
        {
            base.UpdatePath(path, pathOrientation, scale);

            //Trace.TraceInformation("HalfSquareTriangleLayout::ResizeChildren");

            // Upper left triangle
            {
                IPath pathUpperLeft = PathGeometries.Triangle.CreatePath(new PathPoint[] { Path.GetSegment(3).Origin, Path.GetSegment(0).Origin, Path.GetSegment(1).Origin });

                //Trace.TraceInformation("Upper left = {0}", path.ToString());

                LayoutSite layoutSite = LayoutSites[0];
                layoutSite.UpdatePath(pathUpperLeft, scale);
            }

            // Lower right triangle.
            //
            {
                IPath pathLowerRight = PathGeometries.Triangle.CreatePath(new PathPoint[] { Path.GetSegment(1).Origin, Path.GetSegment(2).Origin, Path.GetSegment(3).Origin });

                //Trace.TraceInformation("Lower right = {0}", path.ToString());

                LayoutSite layoutSite = LayoutSites[1];
                layoutSite.UpdatePath(pathLowerRight, scale);
            }
        }
Exemplo n.º 2
0
        public override void UpdatePath(IPath path, PathOrientation pathOrientation, DimensionScale scale)
        {
            base.UpdatePath(path, pathOrientation, scale);

            LayoutSite layoutSite = LayoutSites[0];

            layoutSite.UpdatePath(Path, scale);
        }
Exemplo n.º 3
0
        public override void UpdatePath(IPath path, PathOrientation pathOrientation, DimensionScale scale)
        {
            base.UpdatePath(path, pathOrientation, scale);

            //Trace.TraceInformation("FlyingGooseLayout::ResizeChildren");

            PathPoint topMidpoint    = Path.Interpolate(0, 0.5);
            PathPoint bottomMidpoint = Path.Interpolate(2, 0.5);

            // Upper left triangle
            {
                IPath pathUpperLeft = PathGeometries.Triangle.CreatePath(new PathPoint[] { Path.GetSegment(3).Origin, Path.GetSegment(0).Origin, topMidpoint });

                //Trace.TraceInformation("Upper left = {0}", path.ToString());

                LayoutSite layoutSite = LayoutSites[0];
                layoutSite.UpdatePath(pathUpperLeft, scale);
            }

            // Upper right triangle.
            //
            {
                IPath pathUpperRight = PathGeometries.Triangle.CreatePath(new PathPoint[] { topMidpoint, Path.GetSegment(1).Origin, Path.GetSegment(2).Origin });

                //Trace.TraceInformation("Upper right = {0}", path.ToString());

                LayoutSite layoutSite = LayoutSites[1];
                layoutSite.UpdatePath(pathUpperRight, scale);
            }

            // Lower left triangle
            {
                IPath pathLowerLeft = PathGeometries.Triangle.CreatePath(new PathPoint[] { topMidpoint, bottomMidpoint, Path.GetSegment(3).Origin });

                //Trace.TraceInformation("Lower left = {0}", path.ToString());

                LayoutSite layoutSite = LayoutSites[2];
                layoutSite.UpdatePath(pathLowerLeft, scale);
            }

            // Lower right triangle.
            //
            {
                IPath pathLowerRight = PathGeometries.Triangle.CreatePath(new PathPoint[] { Path.GetSegment(2).Origin, bottomMidpoint, topMidpoint });

                //Trace.TraceInformation("Lower right= {0}", path.ToString());

                LayoutSite layoutSite = LayoutSites[3];
                layoutSite.UpdatePath(pathLowerRight, scale);
            }
        }