internal GtkSubPaintbrush(GtkPaintbrush master) : base(master) { savedColor = master.Color; savedFontFamily = master.FontFamily; savedFontSize = master.FontSize; savedFontStyle = master.FontStyle; master.Context.Save(); }
public override void Dispose() { GtkPaintbrush master = this.BaseBrush as GtkPaintbrush; master.Context.Restore(); master.Color = savedColor; master.FontFamily = savedFontFamily; master.FontSize = savedFontSize; master.FontStyle = savedFontStyle; }
protected override bool OnExposeEvent(EventExpose args) { base.OnExposeEvent(args); Context context = CairoHelper.Create(args.Window); IPaintbrush pb = new GtkPaintbrush(this, context); CanvasModel.Paint(pb); (context.Target as IDisposable).Dispose(); (context as IDisposable).Dispose(); return(true); }