public override Graphics CreateGraphics() { if (graphics == null) return null; var handler = new GraphicsHandler((GraphicsHandler)graphics.Handler); handler.BeginDrawing(); return new Graphics(handler); }
protected override void Initialize() { base.Initialize(); Control.SetStyle(swf.ControlStyles.SupportsTransparentBackColor | swf.ControlStyles.DoubleBuffer, false); Control.SetStyle(swf.ControlStyles.AllPaintingInWmPaint | swf.ControlStyles.Opaque, true); Control.HandleCreated += (sender, e) => { graphics = new Graphics(new GraphicsHandler(this)); graphicsHandler = (GraphicsHandler)graphics.Handler; }; }
public GraphicsHandler(GraphicsHandler other) { Control = other.Control; disposeControl = false; }