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

GetBackPath() public method

Generate a graphics path that encloses the border and is used when rendering a background to ensure the background does not draw over the border area.
public GetBackPath ( RenderContext context, Rectangle rect, IPaletteBorder palette, VisualOrientation orientation, PaletteState state ) : GraphicsPath
context RenderContext Rendering context.
rect System.Drawing.Rectangle Target rectangle.
palette IPaletteBorder Palette used for drawing.
orientation VisualOrientation Visual orientation of the border.
state PaletteState State associated with rendering.
return System.Drawing.Drawing2D.GraphicsPath
        public override GraphicsPath GetBackPath(RenderContext context,
                                                 Rectangle rect,
                                                 IPaletteBorder palette,
                                                 VisualOrientation orientation,
                                                 PaletteState state)
        {
            Debug.Assert(context != null);
            Debug.Assert(palette != null);

            // Validate parameter references
            if (context == null) throw new ArgumentNullException("context");
            if (palette == null) throw new ArgumentNullException("palette");

            Debug.Assert(context.Control != null);
            Debug.Assert(!context.Control.IsDisposed);

            // Use helper to create a border path in middle of the pen
            return CreateBorderBackPath(false,
                                        true,
                                        rect,
                                        CommonHelper.OrientateDrawBorders(palette.GetBorderDrawBorders(state), orientation),
                                        palette.GetBorderWidth(state),
                                        palette.GetBorderRounding(state),
                                        (palette.GetBorderGraphicsHint(state) == PaletteGraphicsHint.AntiAlias),
                                        0);
        }
RenderStandard