public void Update(Graphics g, string text, Font font, Padding internalBounds, Rectangle bounds, Color color, Color backColor, TextFormatFlags formatFlags, IThemeTextOption[] options) { IntPtr compatHdc = this._TextHDC; if (bounds.Equals(this._TextHDCBounds)) { IntPtr hClearBrush = NativeMethod.CreateSolidBrush(ColorTranslator.ToWin32(backColor)); RECT cleanRect = new RECT(bounds); NativeMethod.FillRect(compatHdc, ref cleanRect, hClearBrush); NativeMethod.DeleteObject(hClearBrush); } else { IntPtr outputHdc = g.GetHdc(); IntPtr DIB; compatHdc = AeroText.CreateNewHDC(outputHdc, bounds, out DIB); this._TextHDC = compatHdc; this._TextHDCBounds = bounds; AeroText.CleanUpHDC(DIB); g.ReleaseHdc(outputHdc); } AeroText.DrawOnHDC(compatHdc, text, font, internalBounds, bounds, color, formatFlags, this._mode, options); }