/* * DrawTabButtonImage */ /// <summary> /// </summary> /// <exception cref="ArgumentNullException"> /// <para> /// <paramref name="g"/> is <see langword="null"/>. /// </para> /// -or- /// <para> /// <paramref name="imageToDraw"/> is <see langword="null"/>. /// </para> /// </exception> private void DrawTabButtonImage(Graphics g, Image imageToDraw, Rectangle imageBounds, bool enabled) { if (g == null) { throw new ArgumentNullException("g"); } if (imageToDraw == null) { throw new ArgumentNullException("imageToDraw"); } if (enabled) { g.DrawImage(imageToDraw, imageBounds); } else { g.DrawImage( imageToDraw, imageBounds, 0, 0, imageBounds.Width, imageBounds.Height, GraphicsUnit.Pixel, NuGenControlPaint.GetGrayscaleImageAttributes() ); } }