Exemple #1
0
        protected override void DrawLines(Graphics graphics)
        {
            GraphicsPath path = new GraphicsPath();

            path.AddPath(
                CreateCube3DPath(Cube3DPart.Main, X, Y, Width, Height, Depth),
                true);

            path.AddPath(
                CreateCube3DPath(Cube3DPart.Right, X, Y, Width, Height, Depth),
                true);
            path.AddPath(
                CreateCube3DPath(Cube3DPart.Top, X, Y, Width, Height, Depth),
                true);

            if (ObliqueLineStyle != ObliqueLineStyle.HideInvisibleLines)
            {
                if (ObliqueLineStyle == ObliqueLineStyle.ShowInvisibleLinesDotted)
                {
                    graphics.DrawPath(LineStyle.Convert(DashStyle.Dash),
                                      CreateCube3DPath(Cube3DPart.Left, X, Y, Width, Height, Depth));
                    graphics.DrawPath(LineStyle.Convert(DashStyle.Dash),
                                      CreateCube3DPath(Cube3DPart.Bottom, X, Y, Width, Height, Depth));
                }
                else
                {
                    path.AddPath(
                        CreateCube3DPath(Cube3DPart.Left, X, Y, Width, Height, Depth),
                        true);
                    path.AddPath(
                        CreateCube3DPath(Cube3DPart.Bottom, X, Y, Width, Height, Depth),
                        true);
                }
            }

            graphics.DrawPath(LineStyle, path);
        }