ComponentFactory.Krypton.Toolkit.RenderStandard.AddOneNoteReversePath C# (CSharp) Method

AddOneNoteReversePath() private static method

private static AddOneNoteReversePath ( GraphicsPath borderPath, VisualOrientation orientation, Rectangle rect, bool forBorder, int rp ) : void
borderPath System.Drawing.Drawing2D.GraphicsPath
orientation VisualOrientation
rect System.Drawing.Rectangle
forBorder bool
rp int
return void
        private static void AddOneNoteReversePath(GraphicsPath borderPath,
                                                  VisualOrientation orientation,
                                                  Rectangle rect,
                                                  bool forBorder,
                                                  int rp)
        {
            int x = Math.Min(Math.Min(9, rect.Width / 2), rect.Height / 2);
            int rpW = Math.Min(rp, rect.Width / 2);

            switch (orientation)
            {
                case VisualOrientation.Top:
                    if (!forBorder)
                        borderPath.AddLine(rect.Left, rect.Bottom, rect.Right, rect.Bottom);

                    borderPath.AddLine(rect.Right, rect.Bottom, rect.Right, rect.Bottom - 1);
                    borderPath.AddArc(rect.Right - x, rect.Top, x, x, 0f, -90f);
                    borderPath.AddLine(rect.Left + rpW, rect.Top, rect.Left, rect.Bottom);
                    break;
                case VisualOrientation.Bottom:
                    if (!forBorder)
                        borderPath.AddLine(rect.Left, rect.Top, rect.Right, rect.Top);

                    borderPath.AddLine(rect.Right, rect.Top, rect.Right, rect.Top + 1);
                    borderPath.AddArc(rect.Right - x, rect.Bottom - x, x, x, 0f, 90f);
                    borderPath.AddLine(rect.Left + rpW, rect.Bottom, rect.Left, rect.Top);
                    break;
            }
        }
RenderStandard