public void Paint(BidiGraphics g, Rectangle bounds) { using (g.Container(bounds.X, bounds.Y)) { g.Graphics.CompositingMode = CompositingMode.SourceOver; g.Graphics.CompositingQuality = CompositingQuality.HighQuality; using (Font boldFont = new Font(_font, FontStyle.Bold)) { Rectangle providerNameRect = new Rectangle(_providerNameLeft, 4, _providerNameWidth, _providerNameHeight); if (_image != null) { g.DrawImage(false, _image, (int)(providerNameRect.Left - _image.Width - IMAGE_PADDING_RIGHT), (int)(providerNameRect.Top - 1)); } g.DrawText(_providerName, boldFont, providerNameRect, Color.White, _textFormatFlags); } g.DrawText(_blogName, _font, new Rectangle(PADDING_LEFT, 23, _blogNameWidth, _providerNameHeight), Color.White, _textFormatFlags); } // This is down here because DrawIcon has a bug (at least with .NET 1.1) where it // doesn't respect any translation transforms that have been applied to the Graphics // object in GDI+. if (_image == null && _icon != null) { g.DrawIcon(false, _icon, new Rectangle(bounds.Left + _imageLeft, bounds.Top + 3, IconWidth, IconHeight)); } }