protected override bool OnExposeEvent(Gdk.EventExpose args)
{
if (bitmap_cache == null) {
bitmap_cache = new Gdk.Pixmap (GdkWindow, background.Width, background.Height, -1);
bitmap_cache.DrawRectangle (Style.WhiteGC, true, 0, 0,
background.Width, background.Height);
using (Graphics g = Gtk.DotNet.Graphics.FromDrawable (bitmap_cache)) {
Plot (g);
}
}
GRect area;
if (args.Area.Intersect (background, out area))
GdkWindow.DrawRectangle (Style.BaseGC (State), true, area);
GdkWindow.DrawDrawable (Style.BlackGC,
bitmap_cache,
0, 0,
background.X, background.Y,
background.Width, background.Height);
Style.PaintShadow (this.Style, GdkWindow, State, ShadowType.In, area,
this, null, background.X, background.Y,
background.Width, background.Height);
if (glass != null) {
glass.Draw (args.Area);
}
return base.OnExposeEvent (args);
}