- 406 名前:デフォルトの名無しさん mailto:sage [2010/02/22(月) 08:44:15 ]
- // Form: DoubleBuffered = true
private void Form1_Resize(object sender, EventArgs e) { this.Invalidate(); } Image im = Properties.Resources.画像; FontFamily fontf = new FontFamily("Times New Roman"); StringFormat stringf = new StringFormat(); private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; using (GraphicsPath path = new GraphicsPath()) using (Brush ib = new TextureBrush(im)) { path.AddPolygon(new[] { new Point(200, 50), new Point(50, 250), new Point(250, 250) }); path.AddString("Drawing", fontf, (int)FontStyle.Bold, 72, new Point(0, 0), stringf); float sc = this.ClientSize.Width / 300.0f; path.Transform(new Matrix(sc, 0, 0, sc, 0, 0)); g.SmoothingMode = SmoothingMode.AntiAlias; g.Clear(Color.Black); g.FillPath(ib, path); }}
|

|