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

CreateTabBorderBackPath() private static method

private static CreateTabBorderBackPath ( RightToLeft rtl, PaletteState state, bool forBorder, Rectangle rect, int borderWidth, TabBorderStyle tabBorderStyle, VisualOrientation orientation, bool smoothing ) : GraphicsPath
rtl RightToLeft
state PaletteState
forBorder bool
rect System.Drawing.Rectangle
borderWidth int
tabBorderStyle TabBorderStyle
orientation VisualOrientation
smoothing bool
return System.Drawing.Drawing2D.GraphicsPath
        private static GraphicsPath CreateTabBorderBackPath(RightToLeft rtl,
                                                            PaletteState state,
                                                            bool forBorder,
                                                            Rectangle rect,
                                                            int borderWidth,
                                                            TabBorderStyle tabBorderStyle,
                                                            VisualOrientation orientation,
                                                            bool smoothing)
        {
            GraphicsPath borderPath = new GraphicsPath();

            // A zero size rectangle cannot be drawn, so return a null path
            if ((rect.Width > 0) && (rect.Height > 0))
            {
                // Shrink the rect by half the width of the pen, because the pen will
                // draw half the distance overlapping each side of the centre anyway.
                int halfBorderWidth = borderWidth / 2;

                // Adjust rectangle for all except the bottom edges
                rect.Width -= (halfBorderWidth * 2);
                rect.Height -= halfBorderWidth;
                rect.X += halfBorderWidth;
                rect.Y += halfBorderWidth;

                // Populate the graphics path for the border style
                CreateTabBorderPath((rtl == RightToLeft.Yes), state, forBorder,
                                    borderPath, rect, tabBorderStyle, orientation);
            }

            return borderPath;
        }
RenderStandard