ComponentFactory.Krypton.Toolkit.RenderBase.DrawIconHelper C# (CSharp) Method

DrawIconHelper() protected static method

Helper routine to draw an image taking into account various properties.
protected static DrawIconHelper ( ViewContext context, Icon icon, Rectangle iconRect, VisualOrientation orientation ) : void
context ViewContext Rendering context.
icon System.Drawing.Icon Icon to be drawn.
iconRect System.Drawing.Rectangle Destination rectangle.
orientation VisualOrientation Visual orientation.
return void
        protected static void DrawIconHelper(ViewContext context,
								             Icon icon,
								             Rectangle iconRect,
								             VisualOrientation orientation)
        {
            Debug.Assert(context != null);

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

            try
            {
                // Finally, just draw the icon and let the transforms do the rest
                context.Graphics.DrawIcon(icon, iconRect);
            }
            finally
            {
            }
        }