예제 #1
0
 internal GtkSubPaintbrush(GtkPaintbrush master) : base(master)
 {
     savedColor      = master.Color;
     savedFontFamily = master.FontFamily;
     savedFontSize   = master.FontSize;
     savedFontStyle  = master.FontStyle;
     master.Context.Save();
 }
예제 #2
0
        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;
        }
예제 #3
0
        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);
        }