当前位置:首页 >> 农林牧渔 >>

六绘图和打印


namespace Test6_1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void panel1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Brush b

rush = new SolidBrush(System.Drawing.Color.Black); Font font = new Font("????", 9, System.Drawing.FontStyle.Regular); g.DrawString("??????×é??????", font, brush, 90, 20); Pen p1 = new Pen(System.Drawing.Color.Red); Pen p2 = new Pen(System.Drawing.Color.Purple); Pen p3 = new Pen(System.Drawing.Color.Blue); Pen p4 = new Pen(System.Drawing.Color.Green); g.DrawLine(p1,0,80, 300, 80); g.DrawLine(p2, 0, 160, 300, 160); g.DrawLine(p3, 80, 0, 80, 240); g.DrawLine(p4, 200, 0, 200, 240); } private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Font font = new Font("????", 9, System.Drawing.FontStyle.Regular); g.DrawString("??????×é??????", font, brush, 90, 20); Pen p1 = new Pen(System.Drawing.Color.Red); Pen p2 = new Pen(System.Drawing.Color.Purple); Pen p3 = new Pen(System.Drawing.Color.Blue); Pen p4 = new Pen(System.Drawing.Color.Green); g.DrawLine(p1, 0, 80, 300, 80); g.DrawLine(p2, 0, 160, 300, 160); g.DrawLine(p3, 80, 0, 80, 240); g.DrawLine(p4, 200, 0, 200, 240); }

private void button1_Click(object sender, EventArgs e) { printDocument1.Print(); } private void button2_Click(object sender, EventArgs e) { printPreviewDialog1.ShowDialog(); } private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } } }

namespace Test6_2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { printDocument1.Print(); } private void panel1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Font font = new Font("????", 9, System.Drawing.FontStyle.Regular); g.DrawString ("??????×é??????", Font, brush, 10, 20);

Pen p1 = new Pen(System.Drawing.Color.Red); Pen p2 = new Pen(System.Drawing.Color.Blue); Pen p3 = new Pen(System.Drawing.Color.Black); g.DrawLine(p1, 20, 180, 160, 40); g.DrawLine(p2, 60, 180, 200, 40); g.DrawLine(p3, 100, 180, 240, 40); } private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Font font=new Font("????", 9, System.Drawing.FontStyle.Regular); g.DrawString("??????×é??????", Font, brush, 10, 20); Pen p1 = new Pen(System.Drawing.Color.Red); Pen p2 = new Pen(System.Drawing.Color.Blue); Pen p3 = new Pen(System.Drawing.Color.Black); g.DrawLine(p1, 20, 180, 160, 40); g.DrawLine(p2, 60, 180, 200, 40); g.DrawLine(p3, 100, 180, 240, 40); } private void button2_Click(object sender, EventArgs e) { printPreviewDialog1.ShowDialog(); } private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } } }

namespace Test6_3 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Graphics g = e.Graphics; Font font = new Font("????", 9, System.Drawing.FontStyle.Regular); Brush brush = new SolidBrush(System.Drawing.Color.Black); g.DrawString("??????×é??????", font, brush, 10, 20); Pen p1 = new Pen(System.Drawing.Color.Red); Pen p2 = new Pen(System.Drawing.Color.Purple); Pen p3 = new Pen(System.Drawing.Color.Blue); Pen p4 = new Pen(System.Drawing.Color.Green); g.DrawArc(p1, g.DrawArc(p2, g.DrawArc(p3, g.DrawArc(p4, } private void panel1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Font font = new Font("????", 9, System.Drawing.FontStyle.Regular); Brush brush = new SolidBrush(System.Drawing.Color.Black); g.DrawString("??????×é??????", font, brush, 10, 20); Pen p1 = new Pen(System.Drawing.Color.Red); Pen p2 = new Pen(System.Drawing.Color.Purple); Pen p3 = new Pen(System.Drawing.Color.Blue); Pen p4 = new Pen(System.Drawing.Color.Green); g.DrawArc(p1, 40, 40, 160, 160, 0, 360); g.DrawArc(p2, 60, 60, 120, 120, 0, 360); g.DrawArc(p3, 80, 80, 80, 80, 0, 360); g.DrawArc(p4, 100, 100, 40, 40, 0, 360); } 40, 40, 160, 160, 60, 60, 120, 120, 80, 80,80, 80, 0, 100, 100, 40, 40, 0, 360); 0, 360); 360); 0, 360);

private void button1_Click(object sender, EventArgs e) { printDocument1.Print(); } private void button2_Click(object sender, EventArgs e) { printPreviewDialog1.Show(); } private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } } }

namespace Test6_4 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void panel1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Brush b1 = new SolidBrush(System.Drawing.Color.Green); Brush b2 = new SolidBrush(System.Drawing.Color.Blue); Brush b3 = new SolidBrush(System.Drawing.Color.Yellow); Brush b4 = new SolidBrush(System.Drawing.Color.Red); Pen pen = new Pen(System.Drawing.Color.Black); Font font = new Font("????", 9); g.DrawString("??????×é??????", font, brush, 10, 20);

g.FillEllipse(b1, g.FillEllipse(b2, g.FillEllipse(b3, g.FillEllipse(b4, }

40, 40, 160, 160); 60, 60, 120, 120); 80, 80, 80, 80); 100, 100, 40, 40);

private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Brush b1 = new SolidBrush(System.Drawing.Color.Green); Brush b2 = new SolidBrush(System.Drawing.Color.Blue); Brush b3 = new SolidBrush(System.Drawing.Color.Yellow); Brush b4 = new SolidBrush(System.Drawing.Color.Red); Pen pen = new Pen(System.Drawing.Color.Black); Font font = new Font("????", 9); g.DrawString("??????×é??????", font, brush, 10, 20); g.FillEllipse(b1, 40, 40, 160, 160); g.FillEllipse(b2, 60, 60, 120, 120); g.FillEllipse(b3, 80, 80, 80, 80); g.FillEllipse(b4, 100, 100, 40, 40); } private void button1_Click(object sender, EventArgs e) { printDocument1.Print(); } private void button2_Click(object sender, EventArgs e) { printPreviewDialog1.ShowDialog(); } private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } } }

namespace Test6_5 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void panel1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Font font = new Font("????", 9, System.Drawing.FontStyle.Regular); Brush brush=new SolidBrush(System.Drawing.Color.Black); Pen p1 = new Pen(System.Drawing.Color.Red); Pen p2 = new Pen(System.Drawing.Color.Blue); Pen p3 = new Pen(System.Drawing.Color.Green); g.DrawString("??????×é?à±???", font, brush, 10, 20); g.DrawPolygon(p1, new Point[] { new Point(50, 100), new Point(20, 150), new Point(80, 150) }); g.DrawPolygon(p2, new Point[] { new Point(100, 100), new Point(100, 150), new Point(150, 150) ,new Point(150,100)}); g.DrawPolygon(p3, new Point[] { new Point(220, 100), new Point(190, 120), new Point(200, 150), new Point(240, 150) ,new Point(250,120)}); } private void button1_Click(object sender, EventArgs e) { printDocument1.Print(); } private void button2_Click(object sender, EventArgs e) { printPreviewDialog1.ShowDialog(); } private void button3_Click(object sender, EventArgs e) {

pageSetupDialog1.ShowDialog(); } private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Graphics g = e.Graphics; Font font = new Font("????", 9, System.Drawing.FontStyle.Regular); Brush brush = new SolidBrush(System.Drawing.Color.Black); Pen p1 = new Pen(System.Drawing.Color.Red); Pen p2 = new Pen(System.Drawing.Color.Blue); Pen p3 = new Pen(System.Drawing.Color.Green); g.DrawString("??????×é?à±???", font, brush, 10, 20); g.DrawPolygon(p1, new Point[] { new Point(50, 100), new Point(20, 150), new Point(80, 150) }); g.DrawPolygon(p2, new Point[] { new Point(100, 100), new Point(100, 150), new Point(150, 150), new Point(150, 100) }); g.DrawPolygon(p3, new Point[] { new Point(220, 100), new Point(190, 120), new Point(200, 150), new Point(240, 150), new Point(250, 120) }); } } }

namespace Test6_6 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void panel1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Font font = new Font("????", 9,

System.Drawing.FontStyle.Regular); Brush b1=new SolidBrush(System.Drawing.Color.Red); Brush b2=new SolidBrush(System.Drawing.Color.Blue); Brush b3 = new SolidBrush(System.Drawing.Color.Green); g.DrawString("??????×é?à±???", font, brush, 10, 20); g.FillPolygon(b1,new Point[]{new Point(50,100),new Point(20,150),new Point(80,150)}); g.FillPolygon(b2, new Point[] { new Point(100, 100), new Point(100, 150), new Point(150, 150), new Point(150, 100) }); g.FillPolygon(b3, new Point[] { new Point(220, 100), new Point(190, 120), new Point(200, 150), new Point(240, 150), new Point(250, 120) }); } private void button1_Click(object sender, EventArgs e) { printDocument1.Print(); } private void button2_Click(object sender, EventArgs e) { printPreviewDialog1.ShowDialog(); } private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Font font = new Font("????", 9, System.Drawing.FontStyle.Regular); Brush b1=new SolidBrush(System.Drawing.Color.Red); Brush b2=new SolidBrush(System.Drawing.Color.Blue); Brush b3 = new SolidBrush(System.Drawing.Color.Green); g.DrawString("??????×é?à±???", font, brush, 10, 20); g.FillPolygon(b1, new Point[] { new Point(50, 100), new Point(20, 150), new Point(80, 150) }); g.FillPolygon(b2, new Point[] { new Point(100, 100), new Point(100, 150), new Point(150, 150), new Point(150, 100) });

g.FillPolygon(b3, new Point[] { new Point(220, 100), new Point(190, 120), new Point(200, 150), new Point(240, 150), new Point(250, 120) }); } } }

namespace Test6_7 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void panel1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Font font = new Font("????", 9); g.DrawString("??????×é????", font, brush, 10, 20); Pen p1 = new Pen(System.Drawing.Color.Purple); Pen p2 = new Pen(System.Drawing.Color.Blue); Pen p3 = new Pen(System.Drawing.Color.Green); g.DrawRectangle(p1, 20, 80, 40, 100); g.DrawRectangle(p2, 80, 100, 100, 40); g.DrawRectangle(p3, 200, 100, 60, 60); } private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Font font = new Font("????", 9); g.DrawString("??????×é????", font, brush, 10, 20); Pen p1 = new Pen(System.Drawing.Color.Purple);

Pen p2 = new Pen(System.Drawing.Color.Blue); Pen p3 = new Pen(System.Drawing.Color.Green); g.DrawRectangle(p1, 20, 80, 40, 100); g.DrawRectangle(p2, 80, 100, 100, 40); g.DrawRectangle(p3, 200, 100, 60, 60); } private void button1_Click(object sender, EventArgs e) { printDocument1.Print(); } private void button2_Click(object sender, EventArgs e) { printPreviewDialog1.ShowDialog(); } private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } } }

namespace Test6_8 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void panel1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Font font = new Font("????", 9); g.DrawString("??????×é????????", font, brush, 10, 20);

Brush b1 = new SolidBrush(System.Drawing.Color.Purple); Brush b2 = new SolidBrush(System.Drawing.Color.Blue); Brush b3 = new SolidBrush(System.Drawing.Color.Green); g.FillRectangle(b1,new Rectangle(20,80,40,100)); g.FillRectangle(b2,new Rectangle(80,100,100,40)); g.FillRectangle(b3,new Rectangle(200,100,60,60)); } private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Font font = new Font("????", 9); g.DrawString("??????×é????????", font, brush, 10, 20); Brush b1 = new SolidBrush(System.Drawing.Color.Purple); Brush b2 = new SolidBrush(System.Drawing.Color.Blue); Brush b3 = new SolidBrush(System.Drawing.Color.Green); g.FillRectangle(b1, new Rectangle(20, 80, 40, 100)); g.FillRectangle(b2, new Rectangle(80, 100, 100, 40)); g.FillRectangle(b3, new Rectangle(200, 100, 60, 60)); } private void button1_Click(object sender, EventArgs e) { printDocument1.Print(); } private void button2_Click(object sender, EventArgs e) { printPreviewDialog1.ShowDialog(); } private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } } }

namespace Test6_9 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void panel1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Font font = new Font("????", 9); g.DrawString("??????", font, brush, 10, 20); Pen p = new Pen(System.Drawing.Color.Blue); g.DrawLines(p,new Point[]{new Point(20,100),new Point(60,60),new Point(100,100),new Point(140,60),new Point(180,100),new Point(220,60),new Point(260,100)}); } private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Font font = new Font("????", 9); g.DrawString("??????", font, brush, 10, 20); Pen p = new Pen(System.Drawing.Color.Blue); g.DrawLines(p, new Point[] { new Point(20, 100), new Point(60, 60), new Point(100, 100), new Point(140, 60), new Point(180, 100), new Point(220, 60), new Point(260, 100) }); } private void button1_Click(object sender, EventArgs e) { printDocument1.Print(); } private void button2_Click(object sender, EventArgs e) {

printPreviewDialog1.ShowDialog(); } private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } } }

namespace Test6_10 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void panel1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Font font = new Font("????", 9); g.DrawString("??????", font, brush, 10, 20); Pen pen = new Pen(System.Drawing.Color.Blue); g.DrawPolygon(pen, new Point[] { new Point(20, 100), new Point(60, 60), new Point(100, 100), new Point(140, 60), new Point(180, 100), new Point(220, 60), new Point(260, 100) }); } private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Font font = new Font("????", 9); g.DrawString("??????", font, brush, 10, 20); Pen pen = new Pen(System.Drawing.Color.Blue); g.DrawPolygon(pen, new Point[] { new Point(20, 100), new

Point(60, 60), new Point(100, 100), new Point(140, 60), new Point(180, 100), new Point(220, 60), new Point(260, 100) }); } private void button1_Click(object sender, EventArgs e) { printDocument1.Print(); } private void button2_Click(object sender, EventArgs e) { printPreviewDialog1.ShowDialog(); } private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } } }

namespace Test6_11 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void panel1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Font font = new Font("????", 9); g.DrawString("??????×é????", font, brush,10,20); Pen p1 = new Pen(System.Drawing.Color.Red); Pen p2 = new Pen(System.Drawing.Color.Green); Pen p3 = new Pen(System.Drawing.Color.Blue);

System.Drawing.Drawing2D.GraphicsPath System.Drawing.Drawing2D.GraphicsPath(); paht1.AddArc(new Rectangle(40, 40, 160, g.DrawPath(p1, paht1); System.Drawing.Drawing2D.GraphicsPath System.Drawing.Drawing2D.GraphicsPath(); path2.AddArc(new Rectangle(40, 40, 160, g.DrawPath(p2, path2); System.Drawing.Drawing2D.GraphicsPath System.Drawing.Drawing2D.GraphicsPath(); path3.AddArc(new Rectangle(40, 40, 160, g.DrawPath(p3, path3); }

paht1

=

new

160), 20, 100); path2 = new

160), 140, 100); path3 = new

160), 260, 100);

private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Font font = new Font("????", 9); g.DrawString("??????×é????", font, brush, 10, 20); Pen p1 = new Pen(System.Drawing.Color.Red); Pen p2 = new Pen(System.Drawing.Color.Green); Pen p3 = new Pen(System.Drawing.Color.Blue); System.Drawing.Drawing2D.GraphicsPath paht1 = new System.Drawing.Drawing2D.GraphicsPath(); paht1.AddArc(new Rectangle(40, 40, 160, 160), 20, 100); g.DrawPath(p1, paht1); System.Drawing.Drawing2D.GraphicsPath path2 = new System.Drawing.Drawing2D.GraphicsPath(); path2.AddArc(new Rectangle(40, 40, 160, 160), 140, 100); g.DrawPath(p2, path2); System.Drawing.Drawing2D.GraphicsPath path3 = new System.Drawing.Drawing2D.GraphicsPath(); path3.AddArc(new Rectangle(40, 40, 160, 160), 260, 100); g.DrawPath(p3, path3); } private void button1_Click(object sender, EventArgs e) { printDocument1.Print(); } private void button2_Click(object sender, EventArgs e)

{ printPreviewDialog1.ShowDialog(); } private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } } }

namespace Test6_12 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Paint(object sender, PaintEventArgs e) { Graphics gp = e.Graphics; gp.DrawString("??????×é????", this.Font, Brushes.Black, new Point(10, 20)); gp.DrawPie(Pens.Red, 40, 40, 160, 160, 20, 100); gp.DrawPie(Pens.Green, 40, 40, 160, 160, 140, 100); gp.DrawPie(Pens.Blue, 40, 40, 160, 160, 260, 100); } private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Graphics gp = e.Graphics; gp.DrawString("??????×é????", this.Font, Brushes.Black, new Point(10, 20)); gp.DrawPie(Pens.Red, 40, 40, 160, 160, 20, 100); gp.DrawPie(Pens.Green, 40, 40, 160, 160, 140, 100); gp.DrawPie(Pens.Blue, 40, 40, 160, 160, 260, 100);

}

private void button1_Click(object sender, EventArgs e) { if (printDialog1.ShowDialog() == DialogResult.OK) { printDocument1.Print(); } } private void button2_Click(object sender, EventArgs e) { printPreviewDialog1.ShowDialog(); } private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } } }

namespace Test6_13 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void panel1_Paint(object sender, PaintEventArgs e) { } private void printDocument1_PrintPage(object System.Drawing.Printing.PrintPageEventArgs e) sender,

{ Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Font font = new Font("????", 9); g.DrawString("??????×é????", font, brush, 10, 20); Brush b1 = new SolidBrush(System.Drawing.Color.Red); Brush b2 = new SolidBrush(System.Drawing.Color.Green); Brush b3 = new SolidBrush(System.Drawing.Color.Blue); g.FillPie(b1, 40, 40, 160, 160, 20, 100); g.FillPie(b2, 40, 40, 160, 160, 140, 100); g.FillPie(b3, 40, 40, 160, 160, 260, 100); } private void button1_Click(object sender, EventArgs e) { printDocument1.Print(); } private void button2_Click(object sender, EventArgs e) { printPreviewDialog1.ShowDialog(); } private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Brush brush = new SolidBrush(System.Drawing.Color.Black); Font font = new Font("????", 9); g.DrawString("??????×é????", font, brush, 10, 20); Brush b1 = new SolidBrush(System.Drawing.Color.Red); Brush b2 = new SolidBrush(System.Drawing.Color.Green); Brush b3 = new SolidBrush(System.Drawing.Color.Blue); g.FillPie(b1, 40, 40, 160, 160, 20, 100); g.FillPie(b2, 40, 40, 160, 160, 140, 100); g.FillPie(b3, 40, 40, 160, 160, 260, 100); } private void Form1_Load(object sender, EventArgs e)

{ } } }

namespace Test6_14 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void panel1_Paint(object sender, PaintEventArgs e) { } private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Font font = new Font("????", 9); Brush brush = new SolidBrush(System.Drawing.Color.Black); g.DrawString("?ú??", font, brush, 10, 20); Pen pen = new Pen(System.Drawing.Color.Blue); g.DrawCurve(pen, new Point[] { new Point(20, 100),new Point(80,60), new Point(140, 100), new Point(200, 140), new Point(260, 100) }); } private void printDocument1_PrintPage(object System.Drawing.Printing.PrintPageEventArgs e) { Graphics g = e.Graphics; Font font = new Font("????", 9); sender,

Brush brush = new SolidBrush(System.Drawing.Color.Black); g.DrawString("?ú??", font, brush, 10, 20); Pen pen = new Pen(System.Drawing.Color.Blue); g.DrawCurve(pen, new Point[] { new Point(20, 100),new Point(80,60), new Point(140, 100), new Point(200, 140), new Point(260, 100) }); } private void button1_Click(object sender, EventArgs e) { printDocument1.Print(); } private void button2_Click(object sender, EventArgs e) { printPreviewDialog1.ShowDialog(); } private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } } }

namespace Test_15 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Paint(object sender, PaintEventArgs e) { Graphics gp = e.Graphics; gp.DrawString("·?±??ú??", this.Font, Brushes.Black, new Point(10, 20));

gp.DrawClosedCurve(Pens.Blue, new Point[] { new Point(20, 100), new Point(80, 60), new Point(140, 100), new Point(200, 140), new Point(260, 100), }); } private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Graphics gp = e.Graphics; gp.DrawString("·?±??ú??", this.Font, Brushes.Black, new Point(10, 20)); gp.DrawClosedCurve(Pens.Blue, new Point[] { new Point(20, 100), new Point(80, 60), new Point(140, 100), new Point(200, 140), new Point(260, 100), }); } private void button1_Click(object sender, EventArgs e) { if (printDialog1.ShowDialog() == DialogResult.OK) { printDocument1.Print(); } } private void button2_Click(object sender, EventArgs e) { printPreviewDialog1.ShowDialog(); } private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } } }

namespace Test6_16 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Font font=new Font("????", 9); Brush brush = new SolidBrush(System.Drawing.Color.Black); Brush brush1 = new SolidBrush(System.Drawing.Color.Blue); g.DrawString("·?±??ú??", font, brush, 10, 20); g.FillClosedCurve(brush1, new Point[] { new Point(20, 100), new Point(80, 60), new Point(140, 100), new Point(200, 140), new Point(260, 100) }); } private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Graphics g = e.Graphics; Font font = new Font("????", 9); Brush brush = new SolidBrush(System.Drawing.Color.Black); Brush brush1 = new SolidBrush(System.Drawing.Color.Blue); g.DrawString("·?±??ú??", font, brush, 10, 20); g.FillClosedCurve(brush1, new Point[] { new Point(20, 100), new Point(80, 60), new Point(140, 100), new Point(200, 140), new Point(260, 100) }); } private void button1_Click(object sender, EventArgs e) { if (printDialog1.ShowDialog() == DialogResult.OK) { printDocument1.Print(); } } private void button2_Click(object sender, EventArgs e) {

printPreviewDialog1.ShowDialog(); } private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } } }

namespace Test6_17 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Font font = new Font("????", 9); Brush brush = new SolidBrush(System.Drawing.Color.Black); g.DrawString("??????×é????", font, brush, 10, 20); Pen p1=new Pen(System.Drawing.Color.Purple); Pen p2=new Pen(System.Drawing.Color.Blue); Pen p3=new Pen(System.Drawing.Color.Green); g.DrawEllipse(p1,40,60,40,120); g.DrawEllipse(p2,80,100,120,40); g.DrawEllipse(p3,200,60,40,120); } private void printDocument1_PrintPage(object System.Drawing.Printing.PrintPageEventArgs e) { Graphics g = e.Graphics; sender,

Font font = new Font("????", 9); Brush brush = new SolidBrush(System.Drawing.Color.Black); g.DrawString("??????×é????", font, brush, 10, 20); Pen p1 = new Pen(System.Drawing.Color.Purple); Pen p2 = new Pen(System.Drawing.Color.Blue); Pen p3 = new Pen(System.Drawing.Color.Green); g.DrawEllipse(p1, 40, 60, 40, 120); g.DrawEllipse(p2, 80, 100, 120, 40); g.DrawEllipse(p3, 200, 60, 40, 120); } private void button1_Click(object sender, EventArgs e) { if (printDialog1.ShowDialog() == DialogResult.OK) { printDocument1.Print(); } } private void button2_Click(object sender, EventArgs e) { printPreviewDialog1.ShowDialog(); } private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } } }

namespace Test6_18 { public partial class Form1 : Form { public Form1() {

InitializeComponent(); } private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Font font=new Font("????", 9); Brush brush = new SolidBrush(System.Drawing.Color.Black); g.DrawString("??????×é????", font, brush, 10, 20); Brush b1 = new SolidBrush(System.Drawing.Color.Purple); Brush b2 = new SolidBrush(System.Drawing.Color.Blue); Brush b3 = new SolidBrush(System.Drawing.Color.Green); g.FillEllipse(b1, 40, 60, 40, 120); g.FillEllipse(b2, 80, 100, 120, 40); g.FillEllipse(b3, 200, 60, 40, 120); } private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Graphics g = e.Graphics; Font font = new Font("????", 9); Brush brush = new SolidBrush(System.Drawing.Color.Black); g.DrawString("??????×é????", font, brush, 10, 20); Brush b1 = new SolidBrush(System.Drawing.Color.Purple); Brush b2 = new SolidBrush(System.Drawing.Color.Blue); Brush b3 = new SolidBrush(System.Drawing.Color.Green); g.FillEllipse(b1, 40, 60, 40, 120); g.FillEllipse(b2, 80, 100, 120, 40); g.FillEllipse(b3, 200, 60, 40, 120); } private void button1_Click(object sender, EventArgs e) { if (printDialog1.ShowDialog() == DialogResult.OK) { printDocument1.Print(); } } private void button2_Click(object sender, EventArgs e) { printPreviewDialog1.ShowDialog(); }

private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } } }

namespace Test6_19 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Font font = new Font("????", 9); Brush brush = new SolidBrush(System.Drawing.Color.Black); g.DrawString("?????°????????", font, brush, 10, 20); Pen p1 = new Pen(System.Drawing.Color.Blue); Pen p2 = new Pen(System.Drawing.Color.Red); g.DrawRectangle(p1, 40, 80, 160, 80); System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath(); path.AddEllipse(new Rectangle(40,80,160,80)); g.DrawPath(p2,path); } private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Graphics g = e.Graphics; Font font = new Font("????", 9); Brush brush = new SolidBrush(System.Drawing.Color.Black);

g.DrawString("?????°????????", font, brush, 10, 20); Pen p1 = new Pen(System.Drawing.Color.Blue); Pen p2 = new Pen(System.Drawing.Color.Red); g.DrawRectangle(p1, 40, 80, 160, 80); System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath(); path.AddEllipse(new Rectangle(40, 80, 160, 80)); g.DrawPath(p2, path); } private void button1_Click(object sender, EventArgs e) { if (printDialog1.ShowDialog() == DialogResult.OK) { printDocument1.Print(); } } private void button2_Click(object sender, EventArgs e) { printPreviewDialog1.ShowDialog(); } private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } } }

namespace Test6_20 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Font font = new Font("????", 9); Brush brush = new SolidBrush(System.Drawing.Color.Black); g.DrawString("?????°????????", font, brush, 10, 20); Brush b1=new SolidBrush(System.Drawing.Color.Blue); Brush b2=new SolidBrush(System.Drawing.Color.White); g.FillRectangle(b1, 40, 80, 160, 80); System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath(); path.AddEllipse(new Rectangle(40, 80, 160, 80)); g.FillPath(b2, path); } private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { Graphics g = e.Graphics; Font font = new Font("????", 9); Brush brush = new SolidBrush(System.Drawing.Color.Black); g.DrawString("?????°????????", font, brush, 10, 20); Brush b1 = new SolidBrush(System.Drawing.Color.Blue); Brush b2 = new SolidBrush(System.Drawing.Color.White); g.FillRectangle(b1, 40, 80, 160, 80); System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath(); path.AddEllipse(new Rectangle(40, 80, 160, 80)); g.FillPath(b2, path); } private void button1_Click(object sender, EventArgs e) { if (printDialog1.ShowDialog() == DialogResult.OK) { printDocument1.Print(); } } private void button2_Click(object sender, EventArgs e) { printPreviewDialog1.ShowDialog(); }

private void button3_Click(object sender, EventArgs e) { pageSetupDialog1.ShowDialog(); } } }


相关文章:
第6章_打印和发布图形_课后练习
第6章 打印和发布图纸 课后练习 1、模型空间和图纸空间视口的区别包括? A.模型空间的视口充满了整个绘图区域 B.图纸空间视口之间可以相互重叠而模型空间视口之间不...
国家一级设计师十年用CAD精髓-连载六七-绘图打印、其他软件交互
国家一级设计师十年用 CAD 精髓国家一级设计师十年用 CAD 精髓 AUTOCAD 使用心得连载之六 --绘图与打印比例控制、套用图框、标注命令 在绘制图纸完毕后,我们都要...
第6章 打印和发布图形 课后练习
第6章 打印和发布图纸 课后练习 1、模型空间和图纸空间视口的区别包括? A.模型空间的视口充满了整个绘图区域 B.图纸空间视口之间可以相互重叠而模型空间视口之间不...
高级绘图练习册打印用20090218
六绘图和打印 暂无评价 14页 免费 第七章 绘图与打印 暂无评价 57页 10财富值 7_第七章 绘图与打印 10页 2财富值喜欢此文档的还喜欢 CAD练习册 23页 免费...
实验6 绘图
实验六 绘图一、实验目的 1、掌握在窗口绘图的基本方法; 2、掌握各种绘图工具的...创建一个元文件, 然后用画图工具对它进行绘制,就当它是一个屏幕或打印机设 ...
CAD打印设置问题
-2- 第六步,此时“打印-模型”界面会消失,进入绘图界面,把你要打印的图纸区域从 右下角到左上角的方向框选(记住一下只能选一张图纸),会再次进入“打印模型...
2015年人美版六年级美术上册教案(直接打印版)
2015年人美版六年级美术上册教案(直接打印版)_其它课程_小学教育_教育专区。2015...(2)绘画 以图为主,文字为辅 内容,景点 地点,名称,票价 23 第 9 课 神秘...
绘图仪说明书第6版
绘图仪说明书第6版_计算机硬件及网络_IT/计算机_专业资料。目录 第1章 第2章...⑵在取打印的整卷图纸时,先要旋转手轮将收纸轴的 撑杆收紧(参见图十五) ;...
绘图与打印比例控制、套用图框、标注命令
CAD 使用心得之六 -- 绘图与打印比例控制、套用图框、标注命令 CAD 使用心得连载之六 ——绘图与打印比例控制、套用图框、标注命令 在绘制图纸完毕后,都要将图纸...
简单六方格子-坐标纸-方便绘图
简单六方格子-坐标纸-方便绘图_物理_自然科学_专业资料。自己用Mathematica画的,比例精确。适合做材料科学的同学,石墨烯、碳化硅等材料的结构模型,打印出来方便绘图。...
更多相关标签:
绘图仪和打印机的区别 | 绘图仪和打印机一样吗 | pdf打印出现绘图错误 | cad打印机绘图仪设置 | 3d打印绘图软件 | 绘图仪与打印机的区别 | 绘图仪打印设置 | 绘图仪 打印机 区别 |