public void Clear(XColor color)
{
if (this.drawGraphics)
{
#if GDI
if (this.targetContext == XGraphicTargetContext.GDI)
this.gfx.Clear(color.ToGdiColor());
#endif
#if WPF
if (this.targetContext == XGraphicTargetContext.WPF)
{
Rect rc = new Rect();
rc.Width = rc.Height = 10000;
this.dc.DrawRectangle(new SolidColorBrush(color.ToWpfColor()), null, rc);
}
#endif
}
if (this.renderer != null)
this.renderer.Clear(color);
}