public 绘图器 创建绘图器() { //if (_gs==null) Graphics _gs = Graphics.FromImage(背景图像); var _绘图器 = new 绘图器(_gs); return(_绘图器); }
public 绘图窗体() { this.BackColor = Color.White; this.Width = 800; this.Height = 600; this.Text = "绘图窗体"; //this.Paint += new System.Windows.Forms.PaintEventHandler(this.FormPaint); Graphics g = this.CreateGraphics(); this.绘图器 = new 绘图器(g); }
private void OnPaint(object sender, PaintEventArgs e) { 绘图器 x = 创建绘图器(); 绘图(x); e.Graphics.DrawImage(背景图像, new Point(0, 0)); //x.销毁(); //e.Graphics.Dispose(); //Console.WriteLine(背景图像.Width); //Console.WriteLine(背景图像.Height); }
public virtual void 绘图(绘图器 HTQ) { }