public void FillRectangle(Brush b, RectangleF rect, TClippingStyle clippingStyle) { if (b == null) { return; } switch (clippingStyle) { case TClippingStyle.None: Canvas.FillRectangle(b, rect.X, rect.Y, rect.Width, rect.Height); break; default: if (b != null) { Canvas.ClipRectangle(rect.X, rect.Y, rect.Width, rect.Height, clippingStyle == TClippingStyle.Exclude); SetClipped(true, RectangleF.Empty); } break; } }